Skip to main content
Glama

search_cancer_markers

Find proteins linked to specific cancer types or with prognostic significance using Human Protein Atlas data.

Instructions

Find proteins associated with specific cancers or with prognostic value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cancerNoCancer type (e.g., breast cancer, lung cancer)
prognosticNoPrognostic filter
formatNoOutput format (default: json)
maxResultsNoMaximum number of results (1-10000, default: 100)

Implementation Reference

  • The handler function for 'search_cancer_markers' tool. Validates input using isValidPathologySearchArgs, constructs a search query based on cancer type and/or prognostic value, calls the shared searchProteins helper, and formats the response or error.
    private async handleSearchCancerMarkers(args: any) { if (!isValidPathologySearchArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid pathology search arguments'); } try { let searchQuery = ''; if (args.cancer) { searchQuery = `cancer:"${args.cancer}"`; } if (args.prognostic) { searchQuery += searchQuery ? ` AND prognostic:"${args.prognostic}"` : `prognostic:"${args.prognostic}"`; } if (!searchQuery) { searchQuery = 'prognostic:*'; // Search for any prognostic markers } const result = await this.searchProteins(searchQuery, args.format || 'json', undefined, args.maxResults); return { content: [ { type: 'text', text: typeof result === 'object' ? JSON.stringify(result, null, 2) : String(result), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error searching cancer markers: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • src/index.ts:574-587 (registration)
    Registration of the 'search_cancer_markers' tool in the tools list returned by ListToolsRequestSchema handler, including description and JSON input schema.
    { name: 'search_cancer_markers', description: 'Find proteins associated with specific cancers or with prognostic value', inputSchema: { type: 'object', properties: { cancer: { type: 'string', description: 'Cancer type (e.g., breast cancer, lung cancer)' }, prognostic: { type: 'string', enum: ['favorable', 'unfavorable'], description: 'Prognostic filter' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, maxResults: { type: 'number', description: 'Maximum number of results (1-10000, default: 100)', minimum: 1, maximum: 10000 }, }, required: [], }, },
  • Runtime type guard function used to validate input arguments for the search_cancer_markers handler, matching the inputSchema.
    const isValidPathologySearchArgs = ( args: any ): args is { cancer?: string; prognostic?: string; format?: string; maxResults?: number } => { return ( typeof args === 'object' && args !== null && (args.cancer === undefined || typeof args.cancer === 'string') && (args.prognostic === undefined || ['favorable', 'unfavorable'].includes(args.prognostic)) && (args.format === undefined || ['json', 'tsv'].includes(args.format)) && (args.maxResults === undefined || (typeof args.maxResults === 'number' && args.maxResults > 0 && args.maxResults <= 10000)) ); };
  • src/index.ts:692-693 (registration)
    Switch case in CallToolRequestSchema handler that dispatches calls to 'search_cancer_markers' to the specific handler method.
    case 'search_cancer_markers': return this.handleSearchCancerMarkers(args);

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/Augmented-Nature/ProteinAtlas-MCP-Server'

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