Skip to main content
Glama

search_cancer_markers

Identify proteins linked to specific cancer types or with prognostic significance using Human Protein Atlas data. Filter results by cancer type, prognosis, and output format for tailored analysis.

Instructions

Find proteins associated with specific cancers or with prognostic value

Input Schema

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

Implementation Reference

  • The primary handler function that implements the core logic of the search_cancer_markers tool. It validates input parameters, constructs a specialized search query for cancer types and prognostic values using the Human Protein Atlas API, executes the search via the internal searchProteins method, and returns the results in the MCP format or an error response.
    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)
    The tool registration entry in the ListToolsRequestSchema handler, defining the tool's name, description, and input schema for MCP tool discovery.
    { 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: [], }, },
  • Custom type guard function that validates the input arguments for the search_cancer_markers tool, enforcing the same constraints as the inputSchema (cancer string, prognostic enum, format enum, maxResults 1-10000).
    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)
    The switch case in the CallToolRequestSchema handler that dispatches calls to the search_cancer_markers tool to its handler function.
    case 'search_cancer_markers': return this.handleSearchCancerMarkers(args);

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

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