search_documentation
Search VeChain documentation to find relevant information, code examples, API references, and implementation guides for blockchain development and feature understanding.
Instructions
Search across the documentation to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about VeChain Docs, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query string |
Implementation Reference
- src/tools.ts:37-71 (handler)The handler function that implements the core logic of the 'search_documentation' tool by proxying the search query to the VeChain Docs MCP client's 'searchDocumentation' tool.callback: async ({ query }: { query: string }) => { try { const vechainDocsMcpClient = await createVechainDocsMcpClient(); const response = await vechainDocsMcpClient.client.callTool({ name: "searchDocumentation", arguments: { query } }) return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } catch (err) { const isAbort = (err as Error)?.name === "AbortError"; return { content: [ { type: "text", text: JSON.stringify( { error: isAbort ? "Request timed out" : "Failed to fetch account", reason: String((err as Error)?.message ?? err), }, null, 2 ), }, ], }; } }
- src/tools.ts:34-36 (schema)Zod-based input schema defining the required 'query' string parameter for the tool.inputSchema: { query: z.string().describe("The search query string"), },
- src/server.ts:74-92 (registration)The registration loop that adds the 'search_documentation' tool (from vechainTools array) to the MCP server, including schema and a thin wrapper around the tool's callback.for (const t of vechainTools) { server.registerTool( t.name, { title: t.name, description: t.description, inputSchema: t.inputSchema }, async (args) => { const result = await t.callback(args); return { content: result.content.map(item => ({ ...item, type: "text" as const })) }; } ); }
- src/tools.ts:30-33 (registration)Tool metadata definition including name, title, and description, part of the vechainTools array used for registration.{ name: "search_documentation", title: "Search VeChain Documentation", description: "Search across the documentation to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about VeChain Docs, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages.",