Skip to main content
Glama
IQAIcom

Upbit MCP Server

by IQAIcom

GET_ORDER

Retrieve a specific order from your Upbit account using its UUID or identifier.

Instructions

Get a single Upbit order (requires private API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNo
identifierNo

Implementation Reference

  • The actual handler for the GET_ORDER tool. It validates parameters (uuid or identifier required), signs a JWT token with the query params, and calls the Upbit API /v1/order endpoint to fetch a single order.
    export const getOrderTool = {
    	name: "GET_ORDER",
    	description: "Get a single Upbit order (requires private API)",
    	parameters: paramsSchema,
    	execute: async ({ uuid, identifier }: Params) => {
    		ensurePrivateEnabled();
    		const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`;
    		const client = createHttpClient(baseURL);
    		const query: Record<string, string> = {};
    		if (uuid) query.uuid = uuid;
    		if (identifier) query.identifier = identifier;
    		const token = signJwtToken(query);
    		const data = await fetchJson<unknown>(client, "/order", {
    			params: query,
    			headers: { Authorization: `Bearer ${token}` },
    		});
    		return JSON.stringify(data, null, 2);
    	},
  • Zod schema defining the input parameters for GET_ORDER: uuid (optional string) and identifier (optional string), with a refinement that at least one must be provided.
    const paramsSchema = z
    	.object({
    		uuid: z.string().optional(),
    		identifier: z.string().optional(),
    	})
    	.refine((v) => v.uuid || v.identifier, {
    		message: "Either uuid or identifier is required",
    	});
  • src/index.ts:37-37 (registration)
    Registration of GET_ORDER tool with the FastMCP server so it's exposed to clients.
    server.addTool(getOrderTool);
  • src/index.ts:12-12 (registration)
    Import of the getOrderTool module in the main entry point.
    import { getOrderTool } from "./tools/get-order.js";
  • Helper function that signs a JWT token with Upbit API credentials. Used by GET_ORDER to authenticate the /v1/order API call.
    export function signJwtToken(
    	params?: Record<string, string | number | boolean | undefined>,
    ): string {
    	const payload: Record<string, unknown> = {
    		access_key: config.upbit.accessKey,
    		nonce: crypto.randomUUID(),
    	};
    
    	if (params && Object.keys(params).length > 0) {
    		const searchParams = new URLSearchParams();
    		const sortedKeys = Object.keys(params).sort();
    		for (const key of sortedKeys) {
    			const value = params[key];
    			if (value === undefined) continue;
    			searchParams.append(key, String(value));
    		}
    		const encoded = searchParams.toString();
    		const queryHash = crypto.createHash("sha512").update(encoded).digest("hex");
    		payload.query_hash = queryHash;
    		payload.query_hash_alg = "SHA512";
    	}
    
    	return jwt.sign(payload, config.upbit.secretKey as string);
    }
Behavior2/5

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

With no annotations, the description carries full burden. It mentions privacy requirement but does not disclose whether it is read-only, idempotent, error behavior, or rate limits. Minimal information beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short but under-specified for a tool with no parameter documentation. It front-loads the verb but sacrifices necessary detail; it is too terse to be effective.

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

Completeness1/5

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

Given two undocumented parameters, no output schema, and no annotations, the description provides insufficient context for correct invocation. The agent cannot infer parameter meaning, return format, or error scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description does not explain the two parameters (uuid, identifier). Their roles and usage are entirely ambiguous, forcing the agent to guess or rely on external knowledge.

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 verb 'Get', the resource 'single Upbit order', and the requirement for private API. It is distinct from siblings like GET_ORDERS (plural) but could more explicitly differentiate from other single-resource tools like GET_DEPOSIT.

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 provides a prerequisite (private API) but lacks explicit guidance on when to use this tool versus alternatives like GET_ORDERS for listing or CANCEL_ORDER for modification. Usage context is implied rather than stated.

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/IQAIcom/mcp-upbit'

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