Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_search_pride_projects

Search PRIDE database for mass spectrometry proteomics projects using keywords and filters for organism, instrument, and experiment type.

Instructions

Search PRIDE database for mass spectrometry proteomics projects using keywords and filters.

Returns: dict: Results array with project accessions, titles, descriptions, organisms, instruments, experiment types, count, search_criteria or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoSearch keywords (e.g., 'proteome', 'cancer', 'human')
organism_filterNoOrganism filter (e.g., 'Homo sapiens', 'human')
instrument_filterNoInstrument type filter (e.g., 'Orbitrap', 'LTQ')
experiment_type_filterNoExperiment type filter (e.g., 'TMT', 'Label-free')
page_sizeNoNumber of results to return (max 100)
sort_fieldNoSort field: submissionDate or publicationDatesubmissionDate
sort_directionNoSort direction: ASC or DESCDESC

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The search_pride_projects function handles searching PRIDE database for mass spectrometry proteomics projects. It accepts keyword, organism_filter, instrument_filter, experiment_type_filter, page_size, sort_field, and sort_direction parameters. It queries the PRIDE REST API v3, processes results, and returns a dict with results, count, and search_criteria.
    def search_pride_projects(
        keyword: Annotated[
            Optional[str],
            Field(description="Search keywords (e.g., 'proteome', 'cancer', 'human')"),
        ] = None,
        organism_filter: Annotated[
            Optional[str],
            Field(description="Organism filter (e.g., 'Homo sapiens', 'human')"),
        ] = None,
        instrument_filter: Annotated[
            Optional[str],
            Field(description="Instrument type filter (e.g., 'Orbitrap', 'LTQ')"),
        ] = None,
        experiment_type_filter: Annotated[
            Optional[str],
            Field(description="Experiment type filter (e.g., 'TMT', 'Label-free')"),
        ] = None,
        page_size: Annotated[
            int,
            Field(description="Number of results to return (max 100)"),
        ] = 20,
        sort_field: Annotated[
            str,
            Field(description="Sort field: submissionDate or publicationDate"),
        ] = "submissionDate",
        sort_direction: Annotated[
            str,
            Field(description="Sort direction: ASC or DESC"),
        ] = "DESC",
    ) -> dict:
        """Search PRIDE database for mass spectrometry proteomics projects using keywords and filters.
    
        Returns:
            dict: Results array with project accessions, titles, descriptions, organisms, instruments, experiment types, count, search_criteria or error message.
        """
        base_url = "https://www.ebi.ac.uk/pride/ws/archive/v3/search/projects"
    
        # Build query parameters
        params: dict[str, str | int] = {}
    
        if page_size > 100:
            page_size = 100
        params["pageSize"] = page_size
        params["page"] = 0
    
        # Add keyword search
        if keyword:
            params["keyword"] = keyword
    
        # Build filter string for specific criteria
        filters = []
        if organism_filter:
            filters.append(f"organisms=={organism_filter}")
        if instrument_filter:
            filters.append(f"instruments=={instrument_filter}")
        if experiment_type_filter:
            filters.append(f"experimentTypes=={experiment_type_filter}")
    
        if filters:
            params["filter"] = ",".join(filters)
    
        # Validate and set sort parameters - use only known working fields
        valid_sort_fields = ["submissionDate", "publicationDate"]
        if sort_field not in valid_sort_fields:
            sort_field = "submissionDate"
        params["sortFields"] = sort_field
    
        valid_sort_directions = ["ASC", "DESC"]
        if sort_direction.upper() not in valid_sort_directions:
            sort_direction = "DESC"
        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": "No PRIDE projects found matching the search criteria",
                    "search_criteria": {
                        "keyword": keyword,
                        "organism_filter": organism_filter,
                        "instrument_filter": instrument_filter,
                        "experiment_type_filter": experiment_type_filter,
                        "sort_field": sort_field,
                        "sort_direction": sort_direction,
                    },
                }
    
            # Process results to include key information
            processed_results = []
            for project in search_results:
                processed_project = {
                    "accession": project.get("accession"),
                    "title": project.get("title"),
                    "description": project.get("projectDescription", "")[:500] + "..."
                    if len(project.get("projectDescription", "")) > 500
                    else project.get("projectDescription", ""),
                    "submission_date": project.get("submissionDate"),
                    "publication_date": project.get("publicationDate"),
                    "organisms": project.get("organisms", []),
                    "instruments": project.get("instruments", []),
                    "experiment_types": project.get("experimentTypes", []),
                    "keywords": project.get("keywords", []),
                    "submitters": project.get("submitters", []),
                    "download_count": project.get("downloadCount", 0),
                }
                processed_results.append(processed_project)
    
            return {
                "results": processed_results,
                "count": len(processed_results),
                "search_criteria": {
                    "keyword": keyword,
                    "organism_filter": organism_filter,
                    "instrument_filter": instrument_filter,
                    "experiment_type_filter": experiment_type_filter,
                    "sort_field": sort_field,
                    "sort_direction": sort_direction,
                },
            }
    
        except requests.exceptions.HTTPError as e:
            return {"error": f"HTTP error: {e}"}
        except Exception as e:
            return {"error": f"Exception occurred: {e!s}"}
  • Pydantic-annotated parameters defining the input schema for the search_pride_projects tool: keyword, organism_filter, instrument_filter, experiment_type_filter (all optional strings), page_size (int, default 20, max 100), sort_field (str, default 'submissionDate'), sort_direction (str, default 'DESC').
    keyword: Annotated[
        Optional[str],
        Field(description="Search keywords (e.g., 'proteome', 'cancer', 'human')"),
    ] = None,
    organism_filter: Annotated[
        Optional[str],
        Field(description="Organism filter (e.g., 'Homo sapiens', 'human')"),
    ] = None,
    instrument_filter: Annotated[
        Optional[str],
        Field(description="Instrument type filter (e.g., 'Orbitrap', 'LTQ')"),
    ] = None,
    experiment_type_filter: Annotated[
        Optional[str],
        Field(description="Experiment type filter (e.g., 'TMT', 'Label-free')"),
    ] = None,
    page_size: Annotated[
        int,
        Field(description="Number of results to return (max 100)"),
    ] = 20,
    sort_field: Annotated[
        str,
        Field(description="Sort field: submissionDate or publicationDate"),
    ] = "submissionDate",
    sort_direction: Annotated[
        str,
        Field(description="Sort direction: ASC or DESC"),
    ] = "DESC",
  • The @core_mcp.tool() decorator registers search_pride_projects as an MCP tool named 'search_pride_projects' via the core_mcp FastMCP server instance.
    @core_mcp.tool()
    def search_pride_projects(
  • Imports and re-exports search_pride_projects from the private module, making it available when the pride package is imported.
    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",
    ]
  • Core MCP server instance (core_mcp) created via FastMCP, which is used to register all tools including search_pride_projects via the @core_mcp.tool() decorator.
    from fastmcp import FastMCP
    
    core_mcp = FastMCP(  # type: ignore
        "BC",
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only mentions the return type (dict with fields) but does not state whether the operation is read-only, any side effects, rate limits, or error cases. This is insufficient for a search tool without 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 two sentences: the first states the purpose, the second lists return fields. It is concise without wordiness, though the structure could be improved by front-loading the purpose more prominently.

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 7 parameters with full schema coverage and an output schema described, the description covers the basics. However, it lacks details on pagination behavior (beyond page_size), combination logic for filters, and absence of any mention of error handling, which would be beneficial for completeness.

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% (all 7 parameters have descriptions). The description adds no extra meaning beyond the schema, merely listing top-level return fields. Baseline is 3 due to high coverage, and no additional parameter context is provided.

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 the tool's purpose: searching the PRIDE database for mass spectrometry proteomics projects using keywords and filters. It is distinct from sibling tools like bc_get_pride_project (retrieves a single project) and bc_search_pride_proteins (searches proteins), providing specific verb+resource differentiation.

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 implies usage for searching PRIDE projects but does not provide explicit guidance on when to use this tool versus alternatives. No exclusions or context for sibling tools are mentioned, leaving the agent to infer based on the tool name alone.

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