Skip to main content
Glama

search_documentation

Search Marinade Finance documentation to find information, code examples, API references, and guides with direct links to relevant pages.

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
NameRequiredDescriptionDefault
queryYesThe search query string

Implementation Reference

  • The handler function that executes the tool: creates a Marinade Finance Docs MCP client and invokes its 'searchDocumentation' tool with the user query, returning the JSON response or handling errors.
    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 ), }, ], }; } } },
  • Zod input schema validating the 'query' parameter as a string.
    inputSchema: { query: z.string().describe("The search query string"), },
  • src/tools.ts:48-89 (registration)
    Tool object definition with name, title, description, input schema, and handler callback, included in the publicTools array which is exported and registered in the MCP server.
    name: "search_documentation", title: "Search Marinade Finance 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 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.", inputSchema: { query: z.string().describe("The search query string"), }, 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 ), }, ], }; } } },
  • Helper function to create and connect the MCP client for the Marinade Finance documentation service, invoked within the tool handler.
    export async function createMarinadeFinanceDocsMcpClient(): Promise<{ client: Client; listTools(): Promise<any[]>; }> { try { const marinadeFinanceDocsMcpClient = await createGitbookMcpClient(marinadeFinanceConfig.mcpClient.marinadeFinanceDocsUrl); return marinadeFinanceDocsMcpClient } catch (err) { McpLogger.error("Error creating Marinade Finance Docs MCP Client:", String(err)); throw err; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leandrogavidia/marinade-finance-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server