Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

get_blood_expression

Retrieve blood cell expression data for proteins to analyze gene activity in immune cells and blood components.

Instructions

Get blood cell expression data for a protein

Input Schema

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

Implementation Reference

  • Primary handler function for the 'get_blood_expression' tool. It validates the input arguments using isValidGeneArgs, fetches the blood expression data via fetchBloodExpression, and returns the JSON-formatted result or an error response.
    private async handleGetBloodExpression(args: any) {
      if (!isValidGeneArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments');
      }
    
      try {
        const result = await this.fetchBloodExpression(args.gene);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching blood expression: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
  • Input schema defining the parameters for the get_blood_expression tool: requires a 'gene' string and optional 'format' enum.
    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:510-521 (registration)
    Registration of the get_blood_expression tool in the ListToolsRequestSchema response, including name, description, and input schema.
    {
      name: 'get_blood_expression',
      description: 'Get blood cell expression 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:680-681 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement that routes calls to the handleGetBloodExpression method.
    case 'get_blood_expression':
      return this.handleGetBloodExpression(args);
  • Helper function that queries the Protein Atlas API for blood expression data using specific blood-related columns and delegates to searchProteins.
    private async fetchBloodExpression(gene: string): Promise<any> {
      const columns = ['g', 'eg', 'rnabcs', 'rnabcd', 'rnabcss', 'blood_RNA_basophil', 'blood_RNA_classical_monocyte', 'blood_RNA_eosinophil', 'blood_RNA_neutrophil', 'blood_RNA_NK-cell'];
      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