Skip to main content
Glama

get_schema_overview

Get all models, fields, and types in one request. Understand the app schema broadly before exploring specific models.

Instructions

Return all models with their fields and types in a single call. Use this for a broad understanding of the app schema before diving into specific models.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler case for 'get_schema_overview' inside the handleTool function. It runs a GraphQL introspection query to fetch the full schema (queryType fields and all types), identifies model names from Connection return types, filters OBJECT types matching those model names, and returns their fields with types and descriptions.
    case "get_schema_overview": {
      const data = await gql(`
        query {
          __schema {
            queryType {
              fields {
                name
                type {
                  kind name
                  ofType { kind name }
                }
              }
            }
            types {
              name
              kind
              description
              fields {
                name
                description
                type {
                  name kind
                  ofType { name kind ofType { name kind } }
                }
              }
            }
          }
        }
      `);
    
      // Identify model names from Connection return types in query fields
      const modelNames = new Set<string>();
      for (const f of data.__schema.queryType.fields as any[]) {
        let t = f.type;
        if (t?.kind === "NON_NULL") t = t.ofType;
        if (t?.name?.endsWith("Connection")) {
          modelNames.add(t.name.replace(/Connection$/, ""));
        }
      }
    
      const models = (data.__schema.types as any[])
        .filter((t) => modelNames.has(t.name) && t.kind === "OBJECT")
        .map((t) => ({
          name: t.name,
          description: t.description ?? "",
          fields: (t.fields ?? []).map((f: any) => ({
            name: f.name,
            type: typeString(f.type),
            description: f.description ?? "",
          })),
        }))
        .sort((a, b) => a.name.localeCompare(b.name));
    
      return { content: [{ type: "text", text: JSON.stringify(models, null, 2) }] };
    }
  • src/tools.ts:546-550 (registration)
    Tool registration entry for 'get_schema_overview' in the TOOL_DEFINITIONS array. Defines its name, description ('Return all models with their fields and types in a single call...'), and empty input schema (no parameters required).
      name: "get_schema_overview",
      description:
        "Return all models with their fields and types in a single call. Use this for a broad understanding of the app schema before diving into specific models.",
      inputSchema: { type: "object", properties: {} },
    },
  • The typeString helper function used within the handler to convert GraphQL type metadata (handling NON_NULL, LIST nesting) into a human-readable type string (e.g., 'String!', '[LabelFilter!]').
    function typeString(t: any): string {
      if (!t) return "String";
      if (t.kind === "NON_NULL") return `${typeString(t.ofType)}!`;
      if (t.kind === "LIST")     return `[${typeString(t.ofType)}]`;
      return t.name ?? "String";
    }
Behavior4/5

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

No annotations, but description transparently reveals the tool's output (all models with fields/types) and scope (single call). A simple read operation, well explained.

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?

Two concise sentences, front-loaded with purpose followed by usage guidance. No extraneous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool returning schema overview, description fully covers purpose and usage. No missing details.

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?

No parameters exist, so description adds no param info. Baseline 4 per guidelines for zero-param tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Return all models with their fields and types in a single call', specifying verb, resource, and scope. It distinguishes from siblings like 'introspect_model' (specific model) and 'list_models' (names only).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Text advises using this for 'broad understanding before diving into specific models', providing context and implying alternatives. Explicit when-not or named alternatives would push to 5.

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/Stronger-eCommerce/gadget-mcp'

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