decodeUrl
Decode URL-encoded data using this tool to restore original text or parameters. Ideal for processing encoded inputs quickly and accurately.
Instructions
Decode URL-encoded input data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Data to decode |
Implementation Reference
- src/tools/encoding.ts:90-100 (handler)The asynchronous handler function that decodes the input URL-encoded string using decodeURIComponent and returns it as text content in MCP format.handler: async ({ input }: { input: string }) => { const decoded = decodeURIComponent(input); return { content: [ { type: 'text', text: decoded } ] }; }
- src/tools/encoding.ts:80-89 (schema)The input schema defining the expected 'input' parameter as a string for the decodeUrl tool.inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Data to decode' } }, required: ['input'] },
- src/index.ts:27-33 (registration)Combines and registers encodingTools (including decodeUrl) with other toolsets into allTools, which is used by the MCP server's listTools and callTool request handlers.const allTools: ToolKit = { ...encodingTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };