Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_pride_project

Retrieve detailed metadata and experimental details for a PRIDE proteomics project using its accession number.

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 main tool handler for get_pride_project. Decorated with @core_mcp.tool(), it retrieves detailed information about a PRIDE mass spectrometry proteomics project via the EBI PRIDE Archive API. Accepts project_accession (required), include_files, and include_similar_projects (optional) parameters. Returns project metadata and optionally files or similar projects.
    @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}"}
  • Tool function signature with Pydantic Field descriptions defining the input schema: project_accession (str), include_files (bool, default False), include_similar_projects (bool, default False).
    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:
  • Tool registration via the @core_mcp.tool() decorator on the get_pride_project function. core_mcp is a FastMCP instance defined in src/biocontext_kb/core/_server.py.
    @core_mcp.tool()
    def get_pride_project(
  • The pride package's __init__.py re-exports get_pride_project from the implementation module, making it accessible via from .pride import * in the core __init__.py.
    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",
  • The core_mcp FastMCP server instance that provides the .tool() decorator used to register get_pride_project as an MCP tool.
    from fastmcp import FastMCP
    
    core_mcp = FastMCP(  # type: ignore
        "BC",
        instructions="Provides access to biomedical knowledge bases.",
    )
Behavior3/5

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

No annotations, and the description does not disclose safety or side effects. It is a read operation but lacks explicit statements about permissions or data freshness.

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?

Two sentences, clear and to the point. Slight redundancy with return type paragraph but overall efficient.

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?

Covers key return fields and optional parameters. Lacks detail on error conditions, but acceptable for a simple retrieval tool.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds useful limits for include_files (first 20 files) and include_similar_projects (limited to 10), which are not in the schema.

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

Purpose5/5

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

The description clearly states it retrieves detailed information about a specific PRIDE project by accession. It distinguishes from sibling search tools that find projects by query.

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?

No explicit guidance on when to use this tool versus search tools. Usage is implied but not directly stated.

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