Skip to main content
Glama

get_record

Retrieve a specific Gadget app record by providing the model name, record ID, and desired fields to return via GraphQL query.

Instructions

Get a single Gadget record by ID. Specify the model name, record ID, and fields to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel name in camelCase, e.g. shopifyOrder, label
idYesRecord ID
fieldsYesGraphQL field selection, e.g. "id name email createdAt"

Implementation Reference

  • The `get_record` tool handler, which fetches a single Gadget record by ID using a dynamically constructed GraphQL query.
    case "get_record": {
      const { model, id, fields } = args as { model: string; id: string; fields: string };
      const query = `
        query GetRecord($id: GadgetID!) {
          ${model}(id: $id) {
            ${fields}
          }
        }
      `;
      const data = await gql(query, { id });
      return { content: [{ type: "text", text: JSON.stringify(data[model], null, 2) }] };
    }
  • The JSON schema definition for the `get_record` tool, specifying input parameters: model, id, and fields.
      name: "get_record",
      description: "Get a single Gadget record by ID. Specify the model name, record ID, and fields to return.",
      inputSchema: {
        type: "object",
        required: ["model", "id", "fields"],
        properties: {
          model: { type: "string", description: "Model name in camelCase, e.g. shopifyOrder, label" },
          id: { type: "string", description: "Record ID" },
          fields: { type: "string", description: "GraphQL field selection, e.g. \"id name email createdAt\"" },
        },
      },
    },
Behavior2/5

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

No annotations provided, so description carries full burden. Only states read operation ('Get') but omits error behavior (missing ID), return structure, rate limits, or Gadget-specific platform constraints that aren't obvious from the schema.

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 efficient sentences with zero waste. Front-loaded with action and resource, followed by parameter enumeration. No redundant information.

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

Completeness3/5

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

Adequate for a simple read operation given rich input schema (100% coverage). However, lacks output description and behavioral edge cases that would be helpful given zero annotations and no output schema.

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 has 100% coverage with complete descriptions for all three parameters. Description restates the three parameters needed but adds minimal semantic depth beyond what the schema already provides, meeting baseline expectations.

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?

States specific verb 'Get', resource 'Gadget record', and scope constraint 'single...by ID'. Clear distinction from sibling 'query_records' (single vs. multiple) through explicit 'single' qualifier.

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?

Implies usage pattern through 'single record by ID', distinguishing from bulk operations. However, lacks explicit when-to-use guidance versus 'query_records' or 'run_graphql' siblings for complex filtering.

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