Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_search_pride_projects

Search the PRIDE database for mass spectrometry proteomics projects using keywords, organism, instrument, and experiment type filters to find relevant research data.

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

  • Handler function for the 'search_pride_projects' tool (likely referred to as 'bc_search_pride_projects' in some contexts). Implements API call to PRIDE search endpoint, parameter validation, result processing, and error handling. Tool schema defined via Annotated parameters with Pydantic Field descriptions.
    @core_mcp.tool()
    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}"}
  • Imports the search_pride_projects function, allowing it to be discovered and the decorator to register it when the pride module is imported by the MCP server.
    from ._search_pride_projects import search_pride_projects
  • Input schema defined using Annotated types and Pydantic Field for descriptions, used by FastMCP for tool input validation.
    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:
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. While it mentions the return format (dict with results array), it doesn't address important behavioral aspects like rate limits, authentication requirements, error handling beyond 'error message', pagination behavior (though page_size parameter exists), or whether this is a read-only operation. For a search tool with no annotation coverage, this leaves significant gaps.

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 concise with two sentences: one stating the purpose and one describing the return format. It's front-loaded with the core functionality. While efficient, the return format description could be more structured or informative given the complexity of the results.

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

Completeness3/5

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

Given that there's an output schema (though not shown here), the description doesn't need to explain return values in detail. However, for a 7-parameter search tool with no annotations, the description provides minimal behavioral context. It covers the basic purpose and return format but lacks guidance on usage versus siblings and important operational considerations like rate limits or error patterns.

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 7 parameters thoroughly with descriptions, defaults, and constraints. The description adds no additional parameter information beyond what's in the schema. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no 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: searching the PRIDE database for mass spectrometry proteomics projects. It specifies the verb 'search' and resource 'PRIDE database projects', but doesn't explicitly differentiate from sibling tools like 'bc_search_pride_proteins' or 'bc_get_pride_project', which appear related but have different scopes.

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. With sibling tools like 'bc_search_pride_proteins' and 'bc_get_pride_project' available, there's no indication of how this search differs from those or when each should be preferred. The description only states what the tool does, not when to use it.

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