Skip to main content
Glama
Vanshika-Rana

Payman AI Documentation MCP Server

get-sdk-help

Get help with Node.js or Python SDK usage by specifying the feature or class you need assistance with.

Instructions

Get help with Node.js or Python SDK usage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sdkYesWhich SDK you need help with
featureYesWhich SDK feature or class you need help with

Implementation Reference

  • Handler function that implements the logic for the 'get-sdk-help' tool. It searches relevant SDK documentation topics for the specified SDK (nodejs or python) and feature, extracts relevant sections, ranks them by relevance, and returns formatted help text with content excerpts and links to full documentation.
    async ({ sdk, feature }) => { log(`Getting help for ${sdk} SDK feature: ${feature}`); const sdkTopics = [ "setup-and-installation", "create-payees", "send-payments", "create-payee", "search-payees", "check-balances", ]; const helpPromises = sdkTopics.map(async (topic) => { const content = await fetchDocMarkdown(pathMap[topic]); const sdkIdentifier = sdk === "nodejs" ? ["node", "nodejs", "javascript", "js"] : ["python", "py"]; const relevance = sdkIdentifier.some( (id) => content.toLowerCase().includes(id) && content.toLowerCase().includes(feature.toLowerCase()) && Math.abs( content.toLowerCase().indexOf(id) - content.toLowerCase().indexOf(feature.toLowerCase()) ) < 500 ); if (!relevance) return null; const lines = content.split("\n"); const featureIndex = lines.findIndex((line) => line.toLowerCase().includes(feature.toLowerCase()) ); if (featureIndex === -1) return null; let headingIndex = featureIndex; while (headingIndex > 0 && !lines[headingIndex].startsWith("#")) { headingIndex--; } const sectionHeading = lines[headingIndex]; const sectionContent = lines .slice(headingIndex, featureIndex + 20) .join("\n"); return { topic, heading: sectionHeading, content: sectionContent, relevance: (content.toLowerCase().includes(sdk) ? 2 : 1) + (sectionContent .toLowerCase() .includes(feature.toLowerCase()) ? 3 : 0), }; }); const helpResults = (await Promise.all(helpPromises)).filter(Boolean); helpResults.sort((a, b) => (b?.relevance || 0) - (a?.relevance || 0)); if (helpResults.length === 0) { return { content: [ { type: "text", text: `No specific help found for ${feature} in the ${sdk} SDK. Try checking the full SDK documentation with get-documentation or using more generic terms.`, }, ], }; } let helpText = `# ${sdk.toUpperCase()} SDK Help: ${feature}\n\n`; helpResults.forEach((result) => { if (!result) return; helpText += `## From ${topicMetadata[result.topic].title}\n\n`; helpText += `${result.content}\n\n`; helpText += `*For complete documentation, use get-documentation with topic "${result.topic}"*\n\n---\n\n`; }); helpText += `## Additional Resources\n\n`; helpText += `- Setup and Installation: use get-documentation with topic "setup-and-installation"\n`; helpText += `- Error Handling: use get-documentation with topic "error-handling"\n`; helpText += `- For code examples, try the get-code-examples tool with feature="${feature}" and language="${sdk}"\n`; return { content: [ { type: "text", text: helpText, }, ], }; } );
  • Input schema for the 'get-sdk-help' tool using Zod, defining parameters 'sdk' (enum: nodejs/python) and 'feature' (string).
    { sdk: z .enum(["nodejs", "python"]) .describe("Which SDK you need help with"), feature: z .string() .describe("Which SDK feature or class you need help with"), },
  • src/index.ts:515-517 (registration)
    Registration of the 'get-sdk-help' tool on the MCP server using server.tool(), including name, description, schema, and inline handler.
    server.tool( "get-sdk-help", "Get help with Node.js or Python SDK usage",

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/Vanshika-Rana/payman-mcp-server'

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