Skip to content

Documentation inconsistency: ListTools method signature on mcp-go.dev #677

@gtxy27

Description

@gtxy27

Description

The documentation on mcp-go.dev shows an incorrect method signature for ListTools.

Issue

Documentation shows (incorrect):

c.ListTools(ctx)

Actual API signature:
func (c *Client) ListTools(
    ctx context.Context,
    request mcp.ListToolsRequest,
) (*mcp.ListToolsResult, error)

Correct usage:
toolsResult, err := c.ListTools(ctx, mcp.ListToolsRequest{})

Evidence

1. https://pkg.go.dev/github.com/mark3labs/mcp-go/client#Client.ListTools shows the correct 2-parameter signature
2. https://github.com/mark3labs/mcp-go/blob/main/examples/simple_client/main.go#L127-L138 uses 2 parameters
3. https://github.com/mark3labs/mcp-go/blob/main/client/client.go#L425 requires 2 parameters

Impact

New users following the mcp-go.dev documentation will encounter compilation errors when calling ListTools with only one parameter.

Suggested Fix

Update the documentation on mcp-go.dev to show the correct method signature with both parameters.

Environment

- mcp-go version: v0.43.2 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for new contributorshelp wantedExtra attention is neededtype: documentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions