GET_WITHDRAWAL
Retrieve withdrawal transaction details from Upbit using a specific UUID to track cryptocurrency transfers and verify transaction status.
Instructions
Get a single withdrawal by UUID (requires private API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes |
Implementation Reference
- src/tools/get-withdrawal.ts:14-25 (handler)The execute function that implements the core logic of the GET_WITHDRAWAL tool, authenticating with Upbit API and fetching withdrawal data by UUID.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", { params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); },
- src/tools/get-withdrawal.ts:6-8 (schema)Zod schema defining the input parameters (uuid: string) and inferred TypeScript type for the tool.const paramsSchema = z.object({ uuid: z.string().min(1) }); type Params = z.infer<typeof paramsSchema>;
- src/index.ts:41-41 (registration)Registers the getWithdrawalTool (named GET_WITHDRAWAL) with the FastMCP server instance.server.addTool(getWithdrawalTool);
- src/index.ts:17-17 (registration)Imports the getWithdrawalTool from its implementation file for registration.import { getWithdrawalTool } from "./tools/get-withdrawal.js";
- src/tools/get-withdrawal.ts:10-26 (handler)Complete tool object definition including name, description, parameters schema, and execute handler.export const getWithdrawalTool = { name: "GET_WITHDRAWAL", description: "Get a single 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", { params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); }, } as const;