Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

search_by_subcellular_location

Find proteins in the Human Protein Atlas database based on their subcellular location, such as nucleus or mitochondria, with reliability filtering options.

Instructions

Find proteins localized to specific subcellular compartments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesSubcellular location (e.g., nucleus, mitochondria, cytosol)
reliabilityNoReliability filter
formatNoOutput format (default: json)
maxResultsNoMaximum number of results (1-10000, default: 100)

Implementation Reference

  • The handler function for the 'search_by_subcellular_location' tool. Validates input using isValidSubcellularSearchArgs, constructs a search query for the Human Protein Atlas API, calls searchProteins helper, and formats the response.
    private async handleSearchBySubcellularLocation(args: any) {
      if (!isValidSubcellularSearchArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid subcellular search arguments');
      }
    
      try {
        let searchQuery = `location:"${args.location}"`;
        if (args.reliability) {
          searchQuery += ` AND reliability:"${args.reliability}"`;
        }
    
        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 subcellular location: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:547-560 (registration)
    Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.
    {
      name: 'search_by_subcellular_location',
      description: 'Find proteins localized to specific subcellular compartments',
      inputSchema: {
        type: 'object',
        properties: {
          location: { type: 'string', description: 'Subcellular location (e.g., nucleus, mitochondria, cytosol)' },
          reliability: { type: 'string', enum: ['approved', 'enhanced', 'supported', 'uncertain'], description: 'Reliability 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: ['location'],
      },
    },
  • Type guard function for validating input arguments to the search_by_subcellular_location tool.
    const isValidSubcellularSearchArgs = (
      args: any
    ): args is { location: string; reliability?: string; format?: string; maxResults?: number } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.location === 'string' &&
        args.location.length > 0 &&
        (args.reliability === undefined || ['approved', 'enhanced', 'supported', 'uncertain'].includes(args.reliability)) &&
        (args.format === undefined || ['json', 'tsv'].includes(args.format)) &&
        (args.maxResults === undefined || (typeof args.maxResults === 'number' && args.maxResults > 0 && args.maxResults <= 10000))
      );
    };
  • src/index.ts:687-688 (registration)
    Dispatch case in the main CallToolRequestSchema handler that routes to the specific tool handler.
    case 'search_by_subcellular_location':
      return this.handleSearchBySubcellularLocation(args);
  • Core helper function used by search_by_subcellular_location to query the Human Protein Atlas API.
    private async searchProteins(query: string, format: string = 'json', columns?: string[], maxResults?: number): Promise<any> {
      // Default columns if none provided - basic protein information
      const defaultColumns = ['g', 'gs', 'eg', 'gd', 'up', 'chr', 'pc', 'pe'];
      const searchColumns = columns && columns.length > 0 ? columns : defaultColumns;
    
      const params: any = {
        search: query,
        format: format,
        columns: searchColumns.join(','),
        compress: 'no',
      };
    
      const response = await this.apiClient.get('/api/search_download.php', { params });
    
      if (format === 'json') {
        return this.parseResponse(response.data, format);
      }
    
      return response.data;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool finds proteins but doesn't reveal key traits: whether it's a read-only operation, if it requires authentication, rate limits, pagination behavior, or what the output looks like (e.g., list format, error handling). For a search tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly. Every word earns its place, contributing to clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a search function with 4 parameters) and the absence of both annotations and an output schema, the description is incomplete. It doesn't cover behavioral aspects like safety or performance, and without an output schema, it fails to explain return values (e.g., protein lists, error formats). This leaves critical gaps for an agent to invoke the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are well-documented in the input schema itself. The description adds no additional meaning beyond the schema, such as explaining how 'location' values map to biological terms or the implications of 'reliability' levels. Since the schema handles the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Find proteins localized to specific subcellular compartments.' It specifies the verb ('Find') and resource ('proteins'), and the scope ('localized to specific subcellular compartments') is well-defined. However, it doesn't explicitly differentiate from sibling tools like 'get_subcellular_location' or 'search_by_tissue,' which might offer similar functionality, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It lacks context about prerequisites, such as needing a specific location input, and doesn't mention sibling tools like 'get_subcellular_location' or 'search_by_tissue' that might be relevant for related queries. This omission leaves the agent without clear usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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