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

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.", )

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