Skip to main content
Glama

get_order_status

Check the status of a placed order by order ID to track shipping and delivery progress for purchased hats.

Instructions

Check the status of a placed order by order ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID returned from place_order

Implementation Reference

  • main.py:432-463 (handler)
    The handler function 'get_order_status' retrieves order status from Shopify and attempts to fetch tracking information from Printful.
    @app.post("/tools/get_order_status")
    async def get_order_status(request: Request):
        body = await request.json()
        order_id = body.get("order_id")
    
        data = await shopify_get(f"orders/{order_id}.json")
        order = data["order"]
    
        # Try Printful
        printful_data = None
        async with httpx.AsyncClient(timeout=10) as client:
            pf = await client.get(f"{PRINTFUL_BASE}/orders/@{order_id}", headers=PRINTFUL_HEADERS)
            if pf.status_code == 200:
                pf_result = pf.json().get("result", {})
                shipments = pf_result.get("shipments", [])
                printful_data = {
                    "status": pf_result.get("status"),
                    "tracking": {
                        "carrier": shipments[0].get("carrier") if shipments else None,
                        "tracking_number": shipments[0].get("tracking_number") if shipments else None,
                        "tracking_url": shipments[0].get("tracking_url") if shipments else None,
                    } if shipments else None,
                }
    
        return {
            "order_id": str(order["id"]),
            "order_number": order.get("order_number"),
            "financial_status": order.get("financial_status"),
            "fulfillment_status": order.get("fulfillment_status") or "unfulfilled",
            "created_at": order.get("created_at"),
            "printful": printful_data,
        }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Check'), but doesn't specify whether it requires authentication, rate limits, error conditions, or what the output looks like (e.g., status values, timestamps). This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the tool's low complexity (single parameter, no output schema, no annotations), the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on behavior, output, and usage context, which could hinder an agent's ability to use it effectively in varied scenarios.

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 schema description coverage is 100%, with the parameter 'order_id' fully documented in the input schema. The description adds minimal value by referencing 'order ID' but doesn't provide additional semantics beyond what the schema already states (e.g., format examples, validation rules). This meets the baseline for high schema coverage.

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 tool's purpose with a specific verb ('Check') and resource ('status of a placed order'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish this tool from potential sibling tools like 'get_order' or 'search_orders' (though none exist in the provided sibling list), which prevents a perfect score.

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?

The description provides minimal guidance by mentioning 'by order ID' and referencing 'order ID returned from place_order' in the schema, but it doesn't offer explicit when-to-use advice, alternatives, or context for choosing this over other tools. No guidance on prerequisites or limitations is given.

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/masonicGIT/shop-mcp-server'

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