Skip to main content
Glama

Introspect Schema

introspect_schema
Read-onlyIdempotent

Fetch a subgraph's GraphQL schema via standard introspection. Returns types, fields, and arguments so an agent can build queries without external docs. Requires your own The Graph API key, passed as _apiKey.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_apiKeyYesYour own The Graph API key (BYO — Pipeworx does not supply one). Free 100k queries/month after signup at https://thegraph.com/studio/apikeys.
subgraph_idYesSubgraph deployment ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
enumsYesList of enum types
objectsYesList of object types with fields
enum_countYesNumber of enum types in schema
query_typeYesRoot query type name
subgraph_idYesSubgraph deployment ID
object_countYesNumber of object types in schema

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "subgraph_id": "5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV"
      -  }
      -]New value: +[
      +  {
      +    "_apiKey": "your-thegraph-api-key",
      +    "subgraph_id": "5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV"
      +  }
      +]
    • addedInput schema / properties / _apiKey
      Added value: +{
      +  "description": "Your own The Graph API key (BYO — Pipeworx does not supply one). Free 100k queries/month after signup at https://thegraph.com/studio/apikeys.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "subgraph_id"
      -]New value: +[
      +  "subgraph_id",
      +  "_apiKey"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "subgraph_id": "5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "enum_count": {
      +      "description": "Number of enum types in schema",
      +      "type": "integer"
      +    },
      +    "enums": {
      +      "description": "List of enum types",
      +      "items": {
      +        "properties": {
      +          "name": {
      +            "description": "Enum type name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "values": {
      +            "description": "Enum value names",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "object_count": {
      +      "description": "Number of object types in schema",
      +      "type": "integer"
      +    },
      +    "objects": {
      +      "description": "List of object types with fields",
      +      "items": {
      +        "properties": {
      +          "description": {
      +            "description": "Type description",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "fields": {
      +            "description": "Fields in this type",
      +            "items": {
      +              "properties": {
      +                "args": {
      +                  "description": "Field arguments",
      +                  "items": {
      +                    "properties": {
      +                      "name": {
      +                        "description": "Argument name",
      +                        "type": [
      +                          "string",
      +                          "null"
      +                        ]
      +                      },
      +                      "type": {
      +                        "description": "Argument type signature",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "description": {
      +                  "description": "Field description",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "name": {
      +                  "description": "Field name",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "type": {
      +                  "description": "Field type signature (flattened)",
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "name": {
      +            "description": "Type name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "query_type": {
      +      "description": "Root query type name",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "subgraph_id": {
      +      "description": "Subgraph deployment ID",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "subgraph_id",
      +    "query_type",
      +    "object_count",
      +    "enum_count",
      +    "objects",
      +    "enums"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior. The description adds useful context beyond that: the tool uses standard GraphQL introspection, returns types/fields/arguments, and requires the user to supply their own The Graph API key. No contradictions with the annotations.

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?

Three tightly scoped sentences, front-loaded with the action and result, followed by the only operational caveat. No filler or repetition.

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?

With full parameter coverage, an output schema, and safety annotations, the description supplies the missing operational context (external API key, purpose, output contents) and is sufficient for an agent to invoke the tool correctly. It could add an explicit sibling contrast, but nothing critical is missing.

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 both subgraph_id and _apiKey are already fully documented in the schema. The description only reinforces the _apiKey requirement without adding new parameter-level detail.

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?

States a specific verb and resource: 'Fetch a subgraph's GraphQL schema via standard introspection.' This clearly identifies the operation as schema discovery rather than query execution, though it never explicitly contrasts it with siblings such as query_subgraph.

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 phrase 'so an agent can build queries without external docs' implies when to use it, and the API-key requirement establishes a precondition. However, there is no explicit when-to-use guidance, no exclusion criteria, and no mention that query_subgraph should be used for actually running queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.