Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_pride_project

Retrieve detailed metadata and experimental information for PRIDE mass spectrometry proteomics projects using project accession numbers.

Instructions

Retrieve detailed information about a specific PRIDE mass spectrometry proteomics project. Returns metadata and experimental details.

Returns: dict: Project details with accession, title, description, organisms, instruments, publications, optionally files/similar_projects or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_accessionYesPRIDE project accession (e.g., 'PRD000001')
include_filesNoInclude file information (limited to first 20 files)
include_similar_projectsNoInclude similar projects based on metadata (limited to 10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'bc_get_pride_project' tool (registered as 'get_pride_project' on core_mcp, prefixed to 'bc_' in main app). Fetches PRIDE project metadata, optional files and similar projects from EBI API.
    @core_mcp.tool()
    def get_pride_project(
        project_accession: Annotated[
            str,
            Field(description="PRIDE project accession (e.g., 'PRD000001')"),
        ],
        include_files: Annotated[
            bool,
            Field(description="Include file information (limited to first 20 files)"),
        ] = False,
        include_similar_projects: Annotated[
            bool,
            Field(description="Include similar projects based on metadata (limited to 10)"),
        ] = False,
    ) -> dict:
        """Retrieve detailed information about a specific PRIDE mass spectrometry proteomics project. Returns metadata and experimental details.
    
        Returns:
            dict: Project details with accession, title, description, organisms, instruments, publications, optionally files/similar_projects or error message.
        """
        base_url = "https://www.ebi.ac.uk/pride/ws/archive/v3"
    
        try:
            # Get basic project information
            project_url = f"{base_url}/projects/{project_accession}"
            response = requests.get(project_url)
            response.raise_for_status()
    
            project_data = response.json()
    
            if not project_data:
                return {"error": f"No data found for PRIDE project {project_accession}"}
    
            result = project_data
    
            # Optionally include file information
            if include_files:
                try:
                    files_url = f"{base_url}/projects/{project_accession}/files"
                    files_response = requests.get(files_url, params={"pageSize": 20})
                    if files_response.status_code == 200:
                        files_data = files_response.json()
                        result["files"] = files_data[:20]  # Limit to first 20 files
    
                        # Get file count
                        count_url = f"{base_url}/projects/{project_accession}/files/count"
                        count_response = requests.get(count_url)
                        if count_response.status_code == 200:
                            result["total_files"] = count_response.json()
    
                except Exception:
                    result["files"] = {"error": "Could not fetch file information"}
    
            # Optionally include similar projects
            if include_similar_projects:
                try:
                    similar_url = f"{base_url}/projects/{project_accession}/similarProjects"
                    similar_response = requests.get(similar_url, params={"pageSize": 10})
                    if similar_response.status_code == 200:
                        similar_data = similar_response.json()
                        result["similar_projects"] = similar_data[:10]  # Limit to first 10
                except Exception:
                    result["similar_projects"] = {"error": "Could not fetch similar projects"}
    
            return result
    
        except requests.exceptions.HTTPError as e:
            if e.response.status_code == 404:
                return {"error": f"PRIDE project {project_accession} not found"}
            return {"error": f"HTTP error: {e}"}
        except Exception as e:
            return {"error": f"Exception occurred: {e!s}"}
  • Pydantic schema definition for tool inputs using Annotated and Field, output is dict.
    def get_pride_project(
        project_accession: Annotated[
            str,
            Field(description="PRIDE project accession (e.g., 'PRD000001')"),
        ],
        include_files: Annotated[
            bool,
            Field(description="Include file information (limited to first 20 files)"),
        ] = False,
        include_similar_projects: Annotated[
            bool,
            Field(description="Include similar projects based on metadata (limited to 10)"),
        ] = False,
    ) -> dict:
  • Registers the core_mcp server (containing get_pride_project tool) into the main mcp_app with prefix slugify('BC') = 'bc', making tool name 'bc_get_pride_project'.
    for mcp in [core_mcp, *(await get_openapi_mcps())]:
        await mcp_app.import_server(
            mcp,
            slugify(mcp.name),
        )
    logger.info("MCP server setup complete.")
  • Defines the core_mcp FastMCP instance named 'BC' where tools like get_pride_project are registered via decorators.
    core_mcp = FastMCP(  # type: ignore
        "BC",
        instructions="Provides access to biomedical knowledge bases.",
    )
  • Imports the get_pride_project function, triggering registration via its @core_mcp.tool() decorator when the module is imported.
    from ._get_pride_project import get_pride_project
    from ._search_pride_projects import search_pride_projects
    from ._search_pride_proteins import search_pride_proteins
    
    __all__ = [
        "get_pride_project",
        "search_pride_projects",
        "search_pride_proteins",
    ]
Behavior3/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. It discloses the return type ('dict: Project details...') and optional inclusions ('optionally files/similar_projects'), but lacks details on error handling, rate limits, authentication needs, or data freshness. The description adds some behavioral context but doesn't fully compensate for the absence of annotations.

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 with two sentences: one stating the purpose and one detailing returns. It's front-loaded with the core function. However, the second sentence could be more streamlined (e.g., merging the return type with details), and it includes some redundancy with the schema (e.g., mentioning optional inclusions).

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 moderate complexity (3 parameters, 1 required), 100% schema coverage, and presence of an output schema, the description is reasonably complete. It covers the core purpose and return structure. However, it could improve by addressing error scenarios or linking to sibling tools, especially since no annotations are provided to fill gaps.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description mentions 'optionally files/similar_projects' which aligns with the boolean parameters but doesn't add meaningful semantics beyond what the schema provides (e.g., explaining why files are limited to 20). Baseline 3 is appropriate when schema does the heavy lifting.

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: 'Retrieve detailed information about a specific PRIDE mass spectrometry proteomics project.' It specifies the verb ('retrieve'), resource ('PRIDE mass spectrometry proteomics project'), and scope ('detailed information'). However, it doesn't explicitly differentiate from sibling tools like 'bc_search_pride_projects' or 'bc_search_pride_proteins', which prevents 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 doesn't mention sibling tools like 'bc_search_pride_projects' for broader searches or specify prerequisites (e.g., needing a project accession). Usage is implied from the parameter description but not explicitly stated in the tool description itself.

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