Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

get_pathology_data

Retrieve cancer and pathology data for specific proteins from the Human Protein Atlas database to support biomedical research and analysis.

Instructions

Get cancer and pathology data for a protein

Input Schema

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

Implementation Reference

  • The main handler function for the 'get_pathology_data' tool. Validates input using isValidGeneArgs, fetches pathology data via fetchPathologyData, and returns the JSON-formatted result or an error response.
    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,
        };
      }
    }
  • Input schema for the 'get_pathology_data' tool, defining required 'gene' parameter and optional 'format'.
    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:562-573 (registration)
    Tool registration in the tools list, specifying name, description, and input schema for MCP server.setTools.
    {
      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)
    Dispatcher switch case in the CallToolRequestHandler that routes 'get_pathology_data' calls to the handler method.
    case 'get_pathology_data':
      return this.handleGetPathologyData(args);
  • Helper method that performs the core data fetch for pathology data by calling searchProteins with specific prognostic columns.
    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);
    }

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