get_qurl
Fetch detailed information and access tokens for any qURL resource using its unique resource ID or qURL display ID.
Instructions
Get details of a qURL resource and its access tokens. Accepts either a resource ID (r_ prefix) or a qURL display ID (q_ prefix).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource_id | Yes | The resource ID (r_ prefix) or qURL display ID (q_ prefix) to fetch. If a q_ ID is passed, the API resolves it to the parent resource automatically. |
Implementation Reference
- src/tools/get-qurl.ts:9-28 (handler)The tool factory function `getQurlTool` defines the `get_qurl` MCP tool. Its handler calls `client.getQURL(input.resource_id)` to fetch a qURL resource and its access tokens, returning the data as JSON text.
export function getQurlTool(client: IQURLClient) { return { name: "get_qurl", description: "Get details of a qURL resource and its access tokens. " + "Accepts either a resource ID (r_ prefix) or a qURL display ID (q_ prefix).", inputSchema: getQurlSchema, handler: async (input: z.infer<typeof getQurlSchema>) => { const result = await client.getQURL(input.resource_id); return { content: [ { type: "text" as const, text: JSON.stringify(result.data), }, ], }; }, }; } - src/tools/get-qurl.ts:5-7 (schema)The input schema `getQurlSchema` uses Zod to validate a single `resource_id` parameter (accepts r_ or q_ prefixed IDs).
export const getQurlSchema = z.object({ resource_id: resourceIdSchema("fetch"), }); - src/server.ts:7-7 (registration)The `getQurlTool` factory is imported from `src/tools/get-qurl.js`.
import { getQurlTool } from "./tools/get-qurl.js"; - src/server.ts:39-53 (registration)`getQurlTool` is added to the `toolFactories` array and registered with the MCP server via `server.tool()`.
const toolFactories = [ createQurlTool, resolveQurlTool, listQurlsTool, getQurlTool, deleteQurlTool, extendQurlTool, updateQurlTool, mintLinkTool, batchCreateTool, ] satisfies ToolFactory[]; for (const factory of toolFactories) { const tool = factory(client); server.tool(tool.name, tool.description, tool.inputSchema.shape, tool.handler); - src/tools/_shared.ts:34-42 (helper)The `resourceIdSchema` helper function produces the Zod schema used for the `resource_id` parameter.
export function resourceIdSchema(verb: string) { return z .string() .min(1) .describe( `The resource ID (r_ prefix) or qURL display ID (q_ prefix) to ${verb}. ` + "If a q_ ID is passed, the API resolves it to the parent resource automatically.", ); }