Skip to content

Add typed MCP tool discovery - #116

Open
krishnadobhal wants to merge 1 commit into
prooflinedev:mainfrom
krishnadobhal:feat/mcp-tool-discovery
Open

krishnadobhal wants to merge 1 commit into
prooflinedev:mainfrom
krishnadobhal:feat/mcp-tool-discovery

Conversation

@krishnadobhal

Copy link
Copy Markdown

Why

TypeScript integrations can call known Proofline MCP tools, but they need a separate MCP client to discover the server’s catalog. A tool picker or integration can now read tool names and input schemas directly through the SDK.

What changed

  • Added client.mcp.listTools(cursor?), which returns one typed page of tool definitions and its optional continuation cursor.
  • Reused the existing stateless MCP handshake and validated the response before returning it. Discovery sends tools/list and performs no tool invocation.
const page = await client.mcp.listTools();
for (const tool of page.tools) {
  console.log(tool.name, tool.inputSchema);
}

Verification

All 107 tests passed, along with build, lint, type checking, and API generation. The discovery test uses a local HTTP server to verify cursor forwarding, final-page handling, and malformed responses. An authenticated smoke test against hosted Proofline is still pending.

Copilot AI balanced review requested due to automatic review settings December 2, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@krishnadobhal

Copy link
Copy Markdown
Author

Hi @mohsen1, could you review this when you have a chance? I added client.mcp.listTools() so TypeScript integrations can discover tool names and input schemas through the SDK. I'd appreciate your feedback on the one-page API and how it exposes the continuation cursor.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants