Skip to main content
Glama
wanzunz

GitHub GraphQL API MCP

by wanzunz

graphql_schema_type

Retrieve documentation for specific GitHub GraphQL schema types to understand their structure and usage in API queries.

Instructions

A tool to query specific type documentation in GitHub GraphQL schema. You need to provide the type_name Args: type_name: Type name like SecurityAdvisoryConnection Returns: str: Documentation content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
type_nameYes

Implementation Reference

  • The handler function for the 'graphql_schema_type' tool. Decorated with @mcp.tool() for registration. It retrieves the specified GraphQL type from the pre-loaded schema and uses print_type to generate its documentation string.
    @mcp.tool()
    def graphql_schema_type(type_name: str):
        """A tool to query specific type documentation in GitHub GraphQL schema. You need to provide the type_name
    Args:
        type_name: Type name like `SecurityAdvisoryConnection`
    Returns:
        str: Documentation content
    """
        type_1 = schema.get_type(type_name)
        return print_type(type_1)
  • Pre-loading the GitHub GraphQL schema from 'schema.docs.graphql' file, which is used by the tool to fetch type information.
    schema = build_schema(schema_content)
    text = print_schema(schema)

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/wanzunz/github_graphql_api_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server