Skip to main content
Glama
PaulieB14

Limitless MCP

get_subgraph_schema

Retrieve GraphQL schema for Limitless subgraphs through introspection to understand available queries and data structures.

Instructions

Get the GraphQL schema for a Limitless subgraph via introspection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subgraphYesWhich subgraph to introspect

Implementation Reference

  • The handler function that executes the GraphQL introspection query against the selected subgraph.
    async ({ subgraph }) => {
      try {
        const introspectionQuery = `{
          __schema {
            types {
              name kind
              fields { name type { name kind ofType { name kind } } }
            }
          }
        }`;
        const data =
          subgraph === "simple"
            ? await querySimple(introspectionQuery)
            : await queryNegRisk(introspectionQuery);
        return textResult(data);
      } catch (e) {
        return errorResult(e);
      }
    }
  • The MCP tool registration for 'get_subgraph_schema', including its description and input schema.
    server.registerTool(
      "get_subgraph_schema",
      {
        description:
          "Get the GraphQL schema for a Limitless subgraph via introspection.",
        inputSchema: {
          subgraph: z
            .enum(["simple", "negrisk"])
            .describe("Which subgraph to introspect"),
        },
      },
      async ({ subgraph }) => {
        try {
          const introspectionQuery = `{
            __schema {
              types {
                name kind
                fields { name type { name kind ofType { name kind } } }
              }
            }
          }`;
          const data =
            subgraph === "simple"
              ? await querySimple(introspectionQuery)
              : await queryNegRisk(introspectionQuery);
          return textResult(data);
        } catch (e) {
          return errorResult(e);
        }
      }
    );

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/PaulieB14/limitless-subgraphs'

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