Skip to main content
Glama

search_by_tissue

Find proteins with specific expression levels in human tissues using Human Protein Atlas data. Filter results by tissue type and expression level to identify relevant proteins.

Instructions

Find proteins highly expressed in specific tissues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tissueYesTissue name (e.g., liver, brain, heart)
expressionLevelNoExpression level filter
formatNoOutput format (default: json)
maxResultsNoMaximum number of results (1-10000, default: 100)

Implementation Reference

  • The core handler function for the 'search_by_tissue' tool. Validates input using isValidTissueSearchArgs, constructs a Lucene-style search query for tissue expression, calls the searchProteins helper to query the Human Protein Atlas API, and returns formatted JSON results or an MCP error response.
    private async handleSearchByTissue(args: any) { if (!isValidTissueSearchArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid tissue search arguments'); } try { let searchQuery = `tissue:"${args.tissue}"`; if (args.expressionLevel) { searchQuery += ` AND expression:"${args.expressionLevel}"`; } 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 by tissue: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; }
  • src/index.ts:496-508 (registration)
    MCP tool registration entry in the ListTools handler, defining the tool name, description, and input schema advertised to clients.
    { name: 'search_by_tissue', description: 'Find proteins highly expressed in specific tissues', inputSchema: { type: 'object', properties: { tissue: { type: 'string', description: 'Tissue name (e.g., liver, brain, heart)' }, expressionLevel: { type: 'string', enum: ['high', 'medium', 'low', 'not detected'], description: 'Expression level 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: ['tissue'], },
  • src/index.ts:678-679 (registration)
    Dispatcher switch case in CallToolRequest handler that maps 'search_by_tissue' tool calls to the handleSearchByTissue method.
    case 'search_by_tissue': return this.handleSearchByTissue(args);
  • Runtime input validation function (type guard) that enforces the tool's input schema, used at the start of the handler.
    const isValidTissueSearchArgs = ( args: any ): args is { tissue: string; expressionLevel?: string; format?: string; maxResults?: number } => { return ( typeof args === 'object' && args !== null && typeof args.tissue === 'string' && args.tissue.length > 0 && (args.expressionLevel === undefined || ['high', 'medium', 'low', 'not detected'].includes(args.expressionLevel)) && (args.format === undefined || ['json', 'tsv'].includes(args.format)) && (args.maxResults === undefined || (typeof args.maxResults === 'number' && args.maxResults > 0 && args.maxResults <= 10000)) );

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