Skip to main content
Glama

Track Package

track_package

Track UPS packages by tracking number to get current status, delivery estimate, and full activity history. Optionally retrieve signature details, milestones, or proof of delivery.

Instructions

Track a UPS package by tracking number. Returns current status, delivery estimate, and full activity history. Optionally includes signature details, milestones, and proof of delivery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackingNumberYesUPS tracking number (7-34 characters)
localeNoLocale for response (e.g. en_US, ja_JP)en_US
returnSignatureNoInclude signature requirement details
returnMilestonesNoInclude detailed movement milestones
returnPODNoInclude proof of delivery information

Implementation Reference

  • Registration of the 'track_package' tool via server.registerTool() with name, input schema, and handler.
    server.registerTool(
    	'track_package',
    	{
    		title: 'Track Package',
    		description:
    			'Track a UPS package by tracking number. Returns current status, delivery estimate, and full activity history. Optionally includes signature details, milestones, and proof of delivery.',
    		inputSchema: {
    			trackingNumber: z.string().min(7).max(34).describe('UPS tracking number (7-34 characters)'),
    			locale: z.string().default('en_US').describe('Locale for response (e.g. en_US, ja_JP)'),
    			returnSignature: z
    				.boolean()
    				.default(false)
    				.describe('Include signature requirement details'),
    			returnMilestones: z
    				.boolean()
    				.default(false)
    				.describe('Include detailed movement milestones'),
    			returnPOD: z.boolean().default(false).describe('Include proof of delivery information'),
    		},
    	},
    	async ({ trackingNumber, locale, returnSignature, returnMilestones, returnPOD }) => {
    		const params: Record<string, string> = { locale };
    		if (returnSignature) params.returnSignature = 'true';
    		if (returnMilestones) params.returnMilestones = 'true';
    		if (returnPOD) params.returnPOD = 'true';
    
    		const response = await client.get<unknown>(
    			`/api/track/${API_VERSIONS.TRACKING}/details/${trackingNumber}`,
    			params,
    		);
    
    		return formatToolResponse(response);
    	},
    );
  • Handler function that sends a GET request to the UPS Tracking API and formats the response.
    	async ({ trackingNumber, locale, returnSignature, returnMilestones, returnPOD }) => {
    		const params: Record<string, string> = { locale };
    		if (returnSignature) params.returnSignature = 'true';
    		if (returnMilestones) params.returnMilestones = 'true';
    		if (returnPOD) params.returnPOD = 'true';
    
    		const response = await client.get<unknown>(
    			`/api/track/${API_VERSIONS.TRACKING}/details/${trackingNumber}`,
    			params,
    		);
    
    		return formatToolResponse(response);
    	},
    );
  • TypeScript interface defining the input parameters for track_package.
    export interface TrackPackageParams {
    	readonly trackingNumber: string;
    	readonly locale?: string;
    	readonly returnSignature?: boolean;
    	readonly returnMilestones?: boolean;
    	readonly returnPOD?: boolean;
    }
  • Helper function that wraps raw API response as MCP tool output (JSON text content).
    export function formatToolResponse(response: unknown) {
    	return {
    		content: [{ type: 'text' as const, text: JSON.stringify(response, null, 2) }],
    	};
    }
  • API version constant TRACKING set to 'v1', used in the tracking endpoint URL.
    export const API_VERSIONS = {
    	SHIPPING: 'v2409',
    	RATING: 'v2403',
    	TRACKING: 'v1',
    	ADDRESS_VALIDATION: 'v2',
    	TIME_IN_TRANSIT: 'v1',
    	PICKUP: 'v1',
    	LOCATOR: 'v2',
    } as const;
Behavior2/5

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

No annotations provided, so the description carries full burden for behavioral disclosure. It explains return values but does not mention rate limits, authentication, error handling, or side effects (e.g., mutations).

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, front-loaded with the core action, and no wasted words. The optional return details are listed succinctly.

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 no output schema, the description adequately covers return values (status, estimate, history, optional details). However, it lacks information on error conditions, performance, or locale-specific behavior.

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 decent descriptions for each parameter. The description adds value by explaining what the tool returns but does not clarify param semantics beyond the schema. Baseline 3 is appropriate.

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 tool tracks a UPS package by tracking number, and specifies what it returns (status, delivery estimate, activity history). It distinguishes itself from sibling tools, none of which track packages (e.g., cancel_pickup, create_shipment).

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?

The description implies usage by stating 'Track a UPS package by tracking number,' but it does not explicitly mention when not to use or provide alternatives. No guidance on unsupported carriers or invalid tracking numbers.

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/roscoej/ups-mcp'

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