Skip to main content
Glama

get_order

Read-onlyIdempotent

Retrieve an order record by its ID to view or process order details.

Instructions

Get an order record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the order to retrieve

Implementation Reference

  • Registration of the 'get_order' tool with its schema (id input) and handler function that calls apiGet('/orders/{id}') and formats the result.
    server.registerTool(
      "get_order",
      {
        description: "Get an order record",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the order to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/orders/${id}`);
          void logResponse("get_order", { id }, record);
          return formatShow(record, "order");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Handler for 'get_order': accepts an 'id' parameter, performs a GET request to /orders/{id} via apiGet, logs the response, and returns the formatted record using formatShow.
    server.registerTool(
      "get_order",
      {
        description: "Get an order record",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the order to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/orders/${id}`);
          void logResponse("get_order", { id }, record);
          return formatShow(record, "order");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for 'get_order': requires a single positive integer 'id' field describing the ID of the order to retrieve.
    "get_order",
    {
      description: "Get an order record",
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
      inputSchema: { id: z.number().int().positive().describe("ID of the order to retrieve") },
    },
  • Import of registerOrderTools from './orders' which registers the 'get_order' tool along with other order tools.
    import { registerOrderTools } from "./orders";
  • registerOrderTools is included in the list of tool registration functions called by registerAllTools.
    registerOrderTools,
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety profile is clear. The description adds no additional behavioral context (e.g., whether it returns full order details or requires specific permissions). It does not contradict 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?

The description is a single, very concise sentence (4 words). No unnecessary words or structure. For a simple retrieval tool, this is optimally concise.

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 tool's simplicity (single parameter, no output schema, clear annotations), the description provides enough context to understand the tool's basic function. It could optionally mention the return value (full order object), but is sufficient for a minimal get operation.

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?

The input schema covers 100% of parameters with a clear description for the 'id' field. The tool description adds no extra parameter meaning beyond what the schema provides. Baseline 3 is appropriate.

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?

The description clearly states the action ('Get') and resource ('an order record'). The purpose is unambiguous, but it does not explicitly differentiate this tool from other get_ tools on the server; the resource name is unique enough to infer distinction.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives (e.g., get_orders for listing). There is no mention of prerequisites, context, or when not to use it.

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/martijnpieters/eduframe-mcp'

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