search_documentation
Search Marinade Finance documentation to find information, code examples, API references, and guides for Solana liquid staking operations.
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 Marinade Finance 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:54-88 (handler)The asynchronous callback function that executes the 'search_documentation' tool. It proxies the query to a remote MCP client's 'searchDocumentation' tool and formats the response.callback: async ({ query }: { query: string }) => { try { const marinadeFinanceDocsMcpClient = await createMarinadeFinanceDocsMcpClient(); const response = await marinadeFinanceDocsMcpClient.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 documentation", reason: String((err as Error)?.message ?? err), }, null, 2 ), }, ], }; } }
- src/tools.ts:51-53 (schema)Zod-based input schema for the 'search_documentation' tool, defining the required 'query' parameter.inputSchema: { query: z.string().describe("The search query string"), },
- src/server.ts:25-42 (registration)Registration of the 'search_documentation' tool (via loop over marinadeFinanceTools) to the MCP server, including schema and handler wrapper.for (const t of marinadeFinanceTools) { server.registerTool( t.name, { title: t.title, 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 })) }; } );