Skip to main content
Glama

introspect_model

Discover all fields and their data types for any Gadget model to understand available data structure and plan queries effectively.

Instructions

List all fields and their types for a Gadget model. Run this first when you're unsure what fields exist on a model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel name in camelCase, e.g. shopifyOrder, label, shopifyShop

Implementation Reference

  • The handler logic for the introspect_model tool, which performs a GraphQL introspection query for a given model type.
    case "introspect_model": {
      const { model } = args as { model: string };
      const typeName = model.charAt(0).toUpperCase() + model.slice(1);
      const data = await gql(`
        query IntrospectModel($name: String!) {
          __type(name: $name) {
            name
            fields {
              name
              description
              type {
                name
                kind
                ofType { name kind }
              }
            }
          }
        }
      `, { name: typeName });
      if (!data.__type) {
        return {
          content: [{ type: "text", text: `No type found for "${typeName}". Try list_models to see available model names, then adjust casing.` }],
        };
      }
      return { content: [{ type: "text", text: JSON.stringify(data.__type, null, 2) }] };
    }
  • src/tools.ts:164-178 (registration)
    The registration definition for the introspect_model tool, including its schema and description.
    {
      name: "introspect_model",
      description:
        "List all fields and their types for a Gadget model. Run this first when you're unsure what fields exist on a model.",
      inputSchema: {
        type: "object",
        required: ["model"],
        properties: {
          model: {
            type: "string",
            description: "Model name in camelCase, e.g. shopifyOrder, label, shopifyShop",
          },
        },
      },
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. While 'List' implies read-only safety, the description lacks details about output format, pagination, or whether this requires specific permissions. It mentions what it does but not behavioral traits like side effects or return structure.

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 sentences with zero waste. The first sentence defines purpose; the second provides usage context. Front-loaded and appropriately sized for the tool's complexity.

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?

Given the simple single-parameter structure and complete schema documentation, the description is nearly sufficient. Minor gap: without an output schema, a brief hint about the return value (e.g., 'returns field metadata') would improve completeness, but the current description is adequate.

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 coverage is 100% with the 'model' parameter fully documented in the schema (including format examples like shopifyOrder). The description adds no additional parameter guidance, which is acceptable given the schema completeness, earning baseline 3.

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?

The description clearly states the specific action ('List all fields and their types') and resource ('for a Gadget model'), distinguishing it from siblings like list_models (which lists models) and query_records (which queries data records vs schema).

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?

The second sentence provides explicit workflow guidance: 'Run this first when you're unsure what fields exist on a model.' This establishes the discovery use case clearly, though it doesn't explicitly mention alternatives if the schema is already known.

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