Skip to main content
Glama
IQAIcom

Upbit MCP Server

by IQAIcom

CANCEL_WITHDRAWAL

Cancel a pending digital asset withdrawal using its unique identifier (UUID). Requires private API access.

Instructions

Cancel a digital asset withdrawal by UUID (requires private API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYes

Implementation Reference

  • The tool definition and handler for CANCEL_WITHDRAWAL. Defines the schema (uuid string), and the execute function that sends a DELETE request to /withdraw with a JWT-signed query.
    export const cancelWithdrawalTool = {
    	name: "CANCEL_WITHDRAWAL",
    	description:
    		"Cancel a digital asset withdrawal by UUID (requires private API)",
    	parameters: paramsSchema,
    	execute: async ({ uuid }: Params) => {
    		ensurePrivateEnabled();
    		const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`;
    		const client = createHttpClient(baseURL);
    		const query = { uuid };
    		const token = signJwtToken(query);
    		const data = await fetchJson<unknown>(client, "/withdraw", {
    			method: "DELETE",
    			params: query,
    			headers: { Authorization: `Bearer ${token}` },
    		});
    		return JSON.stringify(data, null, 2);
    	},
    } as const;
  • Zod schema requiring a 'uuid' string (min length 1) for the withdrawal cancellation request.
    const paramsSchema = z.object({ uuid: z.string().min(1) });
  • src/index.ts:1-69 (registration)
    Registration of cancelWithdrawalTool via server.addTool(cancelWithdrawalTool) on line 43, with import from './tools/cancel-withdrawal.js' on line 4.
    #!/usr/bin/env node
    import { FastMCP } from "fastmcp";
    import { cancelOrderTool } from "./tools/cancel-order.js";
    import { cancelWithdrawalTool } from "./tools/cancel-withdrawal.js";
    import { createDepositAddressTool } from "./tools/create-deposit-address.js";
    import { createOrderTool } from "./tools/create-order.js";
    import { createWithdrawalTool } from "./tools/create-withdrawal.js";
    import { getAccountsTool } from "./tools/get-accounts.js";
    import { getDepositTool } from "./tools/get-deposit.js";
    import { getDepositAddressTool } from "./tools/get-deposit-address.js";
    import { getDepositChanceTool } from "./tools/get-deposit-chance.js";
    import { getOrderTool } from "./tools/get-order.js";
    import { getOrderbookTool } from "./tools/get-orderbook.js";
    import { getOrdersTool } from "./tools/get-orders.js";
    import { getTickerTool } from "./tools/get-ticker.js";
    import { getTradesTool } from "./tools/get-trades.js";
    import { getWithdrawalTool } from "./tools/get-withdrawal.js";
    import { listDepositAddressesTool } from "./tools/list-deposit-addresses.js";
    import { listDepositsTool } from "./tools/list-deposits.js";
    import { listWithdrawalAddressesTool } from "./tools/list-withdrawal-addresses.js";
    import { listWithdrawalsTool } from "./tools/list-withdrawals.js";
    
    async function main() {
    	console.log("Initializing Upbit MCP Server...");
    
    	const server = new FastMCP({
    		name: "Upbit MCP Server",
    		version: "0.0.1",
    	});
    
    	server.addTool(getTickerTool);
    	server.addTool(getOrderbookTool);
    	server.addTool(getTradesTool);
    	server.addTool(getAccountsTool);
    	server.addTool(createOrderTool);
    	server.addTool(getOrdersTool);
    	server.addTool(getOrderTool);
    	server.addTool(cancelOrderTool);
    	server.addTool(listWithdrawalAddressesTool);
    	server.addTool(createWithdrawalTool);
    	server.addTool(getWithdrawalTool);
    	server.addTool(listWithdrawalsTool);
    	server.addTool(cancelWithdrawalTool);
    	server.addTool(getDepositChanceTool);
    	server.addTool(createDepositAddressTool);
    	server.addTool(getDepositAddressTool);
    	server.addTool(listDepositAddressesTool);
    	server.addTool(getDepositTool);
    	server.addTool(listDepositsTool);
    
    	try {
    		await server.start({
    			transportType: "stdio",
    		});
    		console.log("✅ Upbit MCP Server started (stdio)");
    	} catch (error) {
    		console.error("❌ Failed to start Upbit MCP Server:", error);
    		process.exit(1);
    	}
    }
    
    main().catch((error) => {
    	console.error(
    		"❌ An unexpected error occurred in the Upbit MCP Server:",
    		error,
    	);
    	process.exit(1);
    });
Behavior2/5

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

With no annotations, the description carries full burden. It reveals the need for private API access but omits critical behavioral traits: whether cancellation is immediate, if funds are returned, if it is irreversible, or error conditions.

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?

Single sentence, directly front-loaded with action and resource. No superfluous words.

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

Completeness2/5

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

Despite low schema coverage and no output schema, the description is minimal. It lacks details on success/failure responses, idempotency, or side effects, which are important for a financial operation.

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

Parameters2/5

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

Schema description coverage is 0%. The description only reiterates 'by UUID' without adding format, source, or constraints. The uuid parameter remains under-documented.

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 action ('Cancel'), the resource ('digital asset withdrawal'), and the identifier ('by UUID'). It distinguishes from sibling tool CANCEL_ORDER by specifying 'digital asset withdrawal'.

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 mentions 'requires private API' hinting at authentication, but does not define when to use this tool versus alternatives like reversing a deposit or modifying an order. Usage is implied but not explicitly guided.

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