Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_open_targets_graphql_schema

Retrieve the GraphQL schema for Open Targets to construct precise queries for biomedical data exploration and analysis.

Instructions

Retrieve the Open Targets GraphQL schema for query construction.

Returns: dict: Schema string in format {'schema': '...'} containing GraphQL type definitions or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_open_targets_graphql_schema' tool (likely invoked as 'bc_get_open_targets_graphql_schema' due to 'BC' server prefix). It fetches the GraphQL schema from Open Targets API and returns it as a formatted string or error.
    @core_mcp.tool()
    def get_open_targets_graphql_schema() -> dict:
        """Retrieve the Open Targets GraphQL schema for query construction.
    
        Returns:
            dict: Schema string in format {'schema': '...'} containing GraphQL type definitions or error message.
        """
        base_url = "https://api.platform.opentargets.org/api/v4/graphql"
        try:
            schema = fetch_graphql_schema(base_url)
            return {"schema": print_schema(schema)}
        except Exception as e:
            return {"error": f"Failed to fetch Open Targets GraphQL schema: {e!s}"}
  • Import statement that loads the tool handler, executing the @core_mcp.tool() decorator for registration.
    from ._get_open_targets_graphql_schema import get_open_targets_graphql_schema
  • Wildcard import of the opentargets module, which triggers the import and registration of the tool.
    from .opentargets import *
  • Definition of the core_mcp FastMCP server instance named 'BC', which likely prefixes tool names with 'bc_' and where tools are registered via decorators.
    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 are provided, so the description carries the full burden. It discloses that the tool retrieves a schema and returns a dict with a schema string or error message, which covers basic behavior. However, it lacks details on potential errors, rate limits, authentication needs, or side effects. The description adds some value but does not fully compensate for the absence of annotations, resulting in moderate transparency.

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

Conciseness5/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 core purpose, and the second clarifies the return format. There is no wasted text, and every sentence adds value. It efficiently communicates essential information without redundancy, making it highly concise and well-structured.

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 simplicity (0 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and the return format, and since an output schema exists, it does not need to detail return values. However, it could improve by adding more behavioral context or usage guidelines, but overall, it covers the basics adequately for this low-complexity 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?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description does not add parameter-specific information, which is unnecessary here. According to the rules, 0 parameters warrants a baseline score of 4, as the description need not compensate for any gaps in parameter documentation.

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 the Open Targets GraphQL schema for query construction.' It specifies the verb ('Retrieve'), resource ('Open Targets GraphQL schema'), and intended use ('for query construction'), which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'bc_query_open_targets_graphql' or 'bc_get_open_targets_query_examples', which might handle queries or examples rather than the schema itself.

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 mentions the purpose but does not specify scenarios, prerequisites, or exclusions. For instance, it does not indicate if this should be used before constructing queries with 'bc_query_open_targets_graphql' or as a reference alongside 'bc_get_open_targets_query_examples', leaving usage context unclear.

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