Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

search-trials

Search ClinicalTrials.gov for studies matching specified medical conditions and locations. Helps users identify relevant clinical trials efficiently.

Instructions

Search ClinicalTrials.gov for relevant studies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionYes
locationNo

Implementation Reference

  • Core implementation of the 'search-trials' tool: extracts parameters, applies caching, queries ClinicalTrials.gov API via searchTrials, and returns formatted JSON results.
    async getTrials(args: any, cache: CacheManager) { const { condition, location } = args; const cacheKey = cache.createKey('trials', { condition, location }); const trials = await cache.getOrFetch( cacheKey, () => this.searchTrials(condition, location) ); return { content: [{ type: 'text', text: JSON.stringify(trials, null, 2) }] }; }
  • Defines the tool metadata and input schema validation for 'search-trials'.
    name: 'search-trials', description: 'Search ClinicalTrials.gov for relevant studies', inputSchema: { type: 'object', properties: { condition: { type: 'string' }, location: { type: 'string' } }, required: ['condition'] } },
  • Registers MCP handlers for listTools (returns tool definitions including search-trials) and callTool requests.
    register(mcpServer: Server) { mcpServer.setRequestHandler(ListToolsRequestSchema, this.handleList); mcpServer.setRequestHandler(CallToolRequestSchema, this.handleCall); } private handleList = async () => ({ tools: TOOL_DEFINITIONS });
  • Dispatcher in callTool handler that routes 'search-trials' invocations to the ClinicalTrials API implementation.
    case "search-trials": return await this.trialsApi.getTrials(request.params.arguments,this.cache);

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/Kartha-AI/google-cloud-healthcare-api-mcp'

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