Skip to main content
Glama

get_pathology_data

Retrieve cancer and pathology data for specific proteins using gene symbols. Supports JSON and TSV formats to access detailed protein-related information from the Human Protein Atlas.

Instructions

Get cancer and pathology data for a protein

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (default: json)
geneYesGene symbol

Implementation Reference

  • Main handler function for the 'get_pathology_data' tool. Validates input using isValidGeneArgs, fetches pathology data via fetchPathologyData(gene), and returns JSON-formatted result or error.
    private async handleGetPathologyData(args: any) { if (!isValidGeneArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments'); } try { const result = await this.fetchPathologyData(args.gene); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching pathology data: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Core helper method that performs the actual API query for pathology data using searchProteins with specific prognostic columns for various cancers.
    private async fetchPathologyData(gene: string): Promise<any> { const columns = ['g', 'eg', 'prognostic_Breast_Invasive_Carcinoma_(TCGA)', 'prognostic_Colon_Adenocarcinoma_(TCGA)', 'prognostic_Lung_Adenocarcinoma_(TCGA)', 'prognostic_Prostate_Adenocarcinoma_(TCGA)']; return this.searchProteins(gene, 'json', columns, 1); }
  • src/index.ts:562-573 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema requiring 'gene' parameter.
    { name: 'get_pathology_data', description: 'Get cancer and pathology data for a protein', inputSchema: { type: 'object', properties: { gene: { type: 'string', description: 'Gene symbol' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['gene'], }, },
  • src/index.ts:690-691 (registration)
    Dispatch case in CallToolRequestSchema handler that routes 'get_pathology_data' calls to the handleGetPathologyData method.
    case 'get_pathology_data': return this.handleGetPathologyData(args);
  • Type guard function used to validate input arguments for gene-based tools like get_pathology_data, checking for required 'gene' string and optional format.
    const isValidGeneArgs = ( args: any ): args is { gene: string; format?: string } => { return ( typeof args === 'object' && args !== null && typeof args.gene === 'string' && args.gene.length > 0 && (args.format === undefined || ['json', 'tsv', 'xml', 'trig'].includes(args.format)) ); };

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