Skip to main content
Glama
helpers.ts423 B
/** * Test Helpers - Utils for working with SDK types */ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; /** * Extract text content from a CallToolResult * Handles the SDK's union type for content */ export function getTextContent(result: CallToolResult): string { const content = result.content[0]; if (content && content.type === 'text') { return content.text; } return ''; }

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/Mnehmos/ChatRPG'

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