Skip to main content
Glama
PaymanAI

Payman Documentation MCP Server

Official
by PaymanAI

get-sdk-help

Resolve Node.js or Python SDK queries by specifying the SDK and feature or class needing assistance. Enhance integration development with targeted documentation support.

Instructions

Get help with Node.js or Python SDK usage

Input Schema

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

Implementation Reference

  • The main handler function for the 'get-sdk-help' tool. It searches SDK documentation topics for relevant content matching the specified SDK (nodejs or python) and feature, extracts relevant sections, ranks by relevance, and compiles a markdown response with help text and links to full docs.
    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,
    			},
    		],
    	};
    }
  • Zod schema defining input parameters: 'sdk' as enum ['nodejs', 'python'] and 'feature' as 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-627 (registration)
    Registration of the 'get-sdk-help' tool on the MCP server, specifying name, description, input schema, and handler.
    server.tool(
    	"get-sdk-help",
    	"Get help with Node.js or Python SDK usage",
    	{
    		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"),
    	},
    	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,
    				},
    			],
    		};
    	}
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets help' but doesn't specify what kind of help (e.g., API references, troubleshooting, examples), how it's delivered (e.g., text response, links), or any constraints like rate limits or authentication needs. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized, making it easy for an agent to parse quickly and understand the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool with 2 parameters. It doesn't explain what the help output entails (e.g., text explanations, code snippets), potential limitations, or how it differs from siblings, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('sdk' with enum values and 'feature' as a string). The description mentions 'Node.js or Python SDK usage', which aligns with the 'sdk' parameter but doesn't add meaningful semantic context beyond what the schema provides, such as examples or usage tips for the 'feature' parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get help with Node.js or Python SDK usage', which specifies the action (get help) and the resources (SDK usage for two languages). However, it doesn't explicitly differentiate from sibling tools like 'get-documentation' or 'solve-problem', which might offer similar assistance, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get-documentation' or 'solve-problem'. It implies usage for SDK help but lacks explicit context, exclusions, or comparisons to sibling tools, leaving the agent to infer usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/PaymanAI/payman-doc-mcp-server'

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