Skip to main content
Glama

search-disease-proteins

Find proteins associated with specific diseases to support research and analysis of disease mechanisms and potential therapeutic targets.

Instructions

Search for proteins related to a disease

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diseaseYesDisease name (e.g., 'covid', 'alzheimer's')

Implementation Reference

  • Main handler function that executes the tool: searches RCSB PDB API for disease-related protein structures, fetches details for top results, handles fallback search, and returns formatted text output.
    export async function searchDiseaseProteins({ disease }: { disease: string }, extra: RequestHandlerExtra): Promise<CallToolResult> {
        console.error(`DEBUG: Processing search-disease-proteins request for disease: ${disease}`);
        
        // Build a proper search query based on the curl example
        const searchQuery = {
            query: {
                type: "group",
                nodes: [
                    {
                        type: "group",
                        nodes: [
                            {
                                type: "group",
                                nodes: [
                                    {
                                        type: "terminal",
                                        service: "full_text",
                                        parameters: {
                                            value: disease
                                        }
                                    }
                                ],
                                logical_operator: "and"
                            }
                        ],
                        logical_operator: "and",
                        label: "full_text"
                    }
                ],
                logical_operator: "and"
            },
            return_type: "entry",
            request_options: {
                paginate: {
                    start: 0,
                    rows: 25
                },
                results_content_type: [
                    "experimental"
                ],
                sort: [
                    {
                        sort_by: "score",
                        direction: "desc"
                    }
                ],
                scoring_strategy: "combined"
            }
        };
        
        console.error(`DEBUG: Using POST request to search API`);
        // Make a POST request with the properly structured query
        const searchData = await makeApiRequest(RCSB_PDB_SEARCH_API, 'POST', searchQuery) as SearchResponse;
    
        if (!searchData || !searchData.result_set) {
            return {
                content: [
                    {
                        type: "text",
                        text: `Failed to search for proteins related to: ${disease}. The search API might be temporarily unavailable.`,
                    },
                ],
            };
        }
    
        // Check if we have results
        const results = searchData.result_set || [];
        console.error(`DEBUG: Found ${results.length} results for disease: ${disease}`);
    
        if (results.length === 0) {
            // Try alternative search with broader criteria
            const altSearchQuery = {
                query: {
                    type: "group",
                    nodes: [
                        {
                            type: "group",
                            nodes: [
                                {
                                    type: "terminal",
                                    service: "text",
                                    parameters: {
                                        attribute: "text",
                                        operator: "contains_phrase",
                                        value: disease
                                    }
                                }
                            ],
                            logical_operator: "and"
                        }
                    ],
                    logical_operator: "and"
                },
                return_type: "entry",
                request_options: {
                    paginate: {
                        start: 0,
                        rows: 25
                    },
                    sort: [
                        {
                            sort_by: "score",
                            direction: "desc"
                        }
                    ]
                }
            };
            
            console.error(`DEBUG: No results with specific search, trying broader search with POST request`);
            const altSearchData = await makeApiRequest(RCSB_PDB_SEARCH_API, 'POST', altSearchQuery) as SearchResponse;
            
            if (!altSearchData || !altSearchData.result_set || altSearchData.result_set.length === 0) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `No proteins found related to: ${disease}. Try using a different disease name or more general terms.`,
                        },
                    ],
                };
            }
            
            const altResults = altSearchData.result_set;
            console.error(`DEBUG: Found ${altResults.length} results with broader search`);
            
            let resultsText = `Found ${altResults.length} proteins that might be related to: "${disease}"\n\n`;
            
            // Process the alternative results
            const topResults = altResults.slice(0, 5);
            for (const result of topResults) {
                const pdbId = result.identifier;
                console.error(`DEBUG: Fetching details for PDB ID: ${pdbId}`);
                
                const structureUrl = `${RCSB_PDB_DATA_API}/core/entry/${pdbId}`;
                const structureData = await makeApiRequest(structureUrl) as StructureData;
    
                if (!structureData) {
                    resultsText += `PDB ID: ${pdbId} (Error fetching details)\n---\n\n`;
                    continue;
                }
    
                resultsText += `PDB ID: ${pdbId}\n`;
                resultsText += `Title: ${structureData?.struct?.title || "Unknown"}\n`;
    
                if (structureData?.rcsb_primary_citation) {
                    const citation = structureData.rcsb_primary_citation;
                    resultsText += `Publication: ${citation.title || "Unknown"} (${citation.journal_abbrev || "Unknown"}, ${citation.year || "Unknown"})\n`;
                }
    
                resultsText += "---\n\n";
            }
            
            resultsText += "To analyze any of these structures in detail, you can use the analyze-active-site tool with the PDB ID.";
            
            return {
                content: [
                    {
                        type: "text",
                        text: resultsText,
                    },
                ],
            };
        }
    
        let resultsText = `Found ${results.length} proteins related to: "${disease}"\n\n`;
    
        // Get detailed info for top 5 results
        const topResults = results.slice(0, 5);
        for (const result of topResults) {
            const pdbId = result.identifier;
            console.error(`DEBUG: Fetching details for PDB ID: ${pdbId}`);
            
            const structureUrl = `${RCSB_PDB_DATA_API}/core/entry/${pdbId}`;
            const structureData = await makeApiRequest(structureUrl) as StructureData;
    
            if (!structureData) {
                resultsText += `PDB ID: ${pdbId} (Error fetching details)\n---\n\n`;
                continue;
            }
    
            resultsText += `PDB ID: ${pdbId}\n`;
            resultsText += `Title: ${structureData?.struct?.title || "Unknown"}\n`;
    
            if (structureData?.rcsb_primary_citation) {
                const citation = structureData.rcsb_primary_citation;
                resultsText += `Publication: ${citation.title || "Unknown"} (${citation.journal_abbrev || "Unknown"}, ${citation.year || "Unknown"})\n`;
            }
    
            resultsText += "---\n\n";
        }
    
        // Add note about how to analyze structures
        resultsText += "To analyze any of these structures in detail, you can use the analyze-active-site tool with the PDB ID.";
    
        return {
            content: [
                {
                    type: "text",
                    text: resultsText,
                },
            ],
        };
    }
  • Input schema using Zod to validate the 'disease' parameter.
    export const searchDiseaseProteinsSchema = {
        disease: z.string().describe("Disease name (e.g., 'covid', 'alzheimer's')"),
    };
  • Registers the tool on the MCP server with name, description, schema, and handler.
    // Register the search-disease-proteins tool
    server.tool(
        "search-disease-proteins",
        "Search for proteins related to a disease",
        searchDiseaseProteinsSchema,
        searchDiseaseProteins
    );
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 only states what the tool does ('Search for proteins') without describing how it behaves—no information about response format, pagination, error handling, rate limits, authentication requirements, or whether it's a read-only or mutating operation. This leaves significant gaps in understanding the tool's behavior.

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 extremely concise—a single sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core functionality, making it efficient and easy to parse, though this conciseness comes at the cost of completeness in other dimensions.

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 lack of annotations and output schema, the description is insufficiently complete. It doesn't explain what the search returns (e.g., protein names, IDs, relevance scores), how results are structured, or any behavioral aspects. For a search tool with no structured output documentation, the description should provide more context about the expected results and operational characteristics.

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%, with the single parameter 'disease' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema (e.g., it doesn't elaborate on search algorithms, result filtering, or disease name formatting). This meets the baseline expectation when schema coverage is complete.

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 with a specific verb ('Search') and resource ('proteins related to a disease'), making it immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'analyze-active-site', which appears to be a different type of analysis tool rather than a direct alternative for searching.

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 doesn't mention the sibling tool 'analyze-active-site' or any other potential tools, nor does it specify prerequisites, constraints, or typical use cases beyond the basic purpose.

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/acashmoney/bio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server