Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_search_pride_proteins

Search for specific proteins within PRIDE mass spectrometry proteomics datasets using project accession numbers and optional keywords to identify proteins, genes, and modifications.

Instructions

Search for proteins identified in a specific PRIDE mass spectrometry project. Useful for finding specific proteins in proteomics datasets.

Returns: dict: Proteins list with accessions, names, genes, sequences, modifications, associated projects or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_accessionYesPRIDE project accession to search proteins in
keywordNoSearch keyword for protein names or accessions
page_sizeNoNumber of results to return (max 100)
sort_fieldNoSort field: accession, proteinName, or geneaccession
sort_directionNoSort direction: ASC or DESCASC

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the bc_search_pride_proteins tool (registered as search_pride_proteins). Queries PRIDE API for proteins in a project, supports keyword search, sorting, pagination. Includes input schema via Annotated Fields.
    @core_mcp.tool()
    def search_pride_proteins(
        project_accession: Annotated[
            str,
            Field(description="PRIDE project accession to search proteins in"),
        ],
        keyword: Annotated[
            Optional[str],
            Field(description="Search keyword for protein names or accessions"),
        ] = None,
        page_size: Annotated[
            int,
            Field(description="Number of results to return (max 100)"),
        ] = 20,
        sort_field: Annotated[
            str,
            Field(description="Sort field: accession, proteinName, or gene"),
        ] = "accession",
        sort_direction: Annotated[
            str,
            Field(description="Sort direction: ASC or DESC"),
        ] = "ASC",
    ) -> dict:
        """Search for proteins identified in a specific PRIDE mass spectrometry project. Useful for finding specific proteins in proteomics datasets.
    
        Returns:
            dict: Proteins list with accessions, names, genes, sequences, modifications, associated projects or error message.
        """
        base_url = "https://www.ebi.ac.uk/pride/ws/archive/v3/pride-ap/search/proteins"
    
        # Build query parameters
        params: dict[str, str | int] = {"projectAccession": project_accession}
    
        if page_size > 100:
            page_size = 100
        params["pageSize"] = page_size
        params["page"] = 0
    
        # Add keyword search
        if keyword:
            params["keyword"] = keyword
    
        # Validate and set sort parameters
        valid_sort_fields = ["accession", "proteinName", "gene"]
        if sort_field not in valid_sort_fields:
            sort_field = "accession"
        params["sortField"] = sort_field
    
        valid_sort_directions = ["ASC", "DESC"]
        if sort_direction.upper() not in valid_sort_directions:
            sort_direction = "ASC"
        params["sortDirection"] = sort_direction.upper()
    
        try:
            response = requests.get(base_url, params=params)
            response.raise_for_status()
    
            search_results = response.json()
    
            if not search_results:
                return {"results": [], "count": 0, "message": f"No proteins found in PRIDE project {project_accession}"}
    
            # Process results to include key information
            processed_results = []
            for protein in search_results:
                processed_protein = {
                    "protein_accession": protein.get("proteinAccession"),
                    "protein_name": protein.get("proteinName"),
                    "gene": protein.get("gene"),
                    "project_count": protein.get("projectCount", 0),
                }
                processed_results.append(processed_protein)
    
            return {
                "results": processed_results,
                "count": len(processed_results),
                "project_accession": project_accession,
                "search_criteria": {"keyword": keyword, "sort_field": sort_field, "sort_direction": sort_direction},
            }
    
        except requests.exceptions.HTTPError as e:
            if e.response.status_code == 404:
                return {"error": f"PRIDE project {project_accession} not found or has no protein data"}
            return {"error": f"HTTP error: {e}"}
        except Exception as e:
            return {"error": f"Exception occurred: {e!s}"}
  • Registers pride tools by importing from .pride which includes search_pride_proteins decorated with @core_mcp.tool().
    from .pride import *
  • Explicit import of the search_pride_proteins function in pride module for higher-level import.
    from ._search_pride_proteins import search_pride_proteins
  • Defines the FastMCP instance 'core_mcp' with prefix 'BC' used to register all tools including search_pride_proteins via @core_mcp.tool() decorator. Tool names likely prefixed as 'bc_search_pride_proteins'.
    core_mcp = FastMCP(  # type: ignore
        "BC",
        instructions="Provides access to biomedical knowledge bases.",
    )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return format ('Returns: dict: Proteins list with accessions, names, genes, sequences, modifications, associated projects or error message'), which adds some context. However, it lacks details on error conditions, rate limits, authentication needs, or pagination behavior beyond what's in the schema. For a search tool with no annotation coverage, this is a significant gap.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded: the first sentence states the purpose, and the second provides return details. There's no wasted text. However, it could be slightly more structured (e.g., separating usage context from returns).

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

Completeness4/5

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

Given the tool's complexity (search with multiple parameters), 100% schema coverage, and the presence of an output schema (implied by 'Returns: dict'), the description is reasonably complete. It covers purpose and return format, though it lacks behavioral details like error handling or performance constraints. With annotations absent, it could do more, but the schema and output schema reduce the burden.

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 schema itself. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain 'project_accession' format or 'keyword' matching rules). According to the rules, with high schema coverage, the baseline is 3 even without param info in the description.

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: 'Search for proteins identified in a specific PRIDE mass spectrometry project.' It specifies the verb ('Search'), resource ('proteins'), and domain context ('PRIDE mass spectrometry project'). However, it doesn't explicitly differentiate from sibling tools like 'bc_search_pride_projects' or 'bc_get_pride_project', which might handle related but different operations.

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

Usage Guidelines3/5

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

The description provides implied usage guidance: 'Useful for finding specific proteins in proteomics datasets.' This suggests the tool is for protein-level queries within proteomics data. However, it doesn't explicitly state when to use this tool versus alternatives (e.g., 'bc_search_pride_projects' for project-level searches) or mention any prerequisites or exclusions.

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/biocontext-ai/knowledgebase-mcp'

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