Skip to main content
Glama

encodeUrl

Convert input data into URL-encoded format using the encoding tool in the MCP server, ensuring compatibility with web standards. Ideal for processing strings in URLs.

Instructions

Encode input data to URL-encoded format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesData to encode

Implementation Reference

  • The async handler function that URL-encodes the input using encodeURIComponent and returns the encoded string in MCP content format.
    handler: async ({ input }: { input: string }) => { const encoded = encodeURIComponent(input); return { content: [ { type: 'text', text: encoded } ] }; }
  • Input schema defining a required 'input' string parameter for the tool.
    inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Data to encode' } }, required: ['input'] },
  • Full tool registration object for encodeUrl, exported as part of encodingTools, which is later included in the main allTools object.
    encodeUrl: { name: 'encodeUrl', description: 'Encode input data to URL-encoded format', inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Data to encode' } }, required: ['input'] }, handler: async ({ input }: { input: string }) => { const encoded = encodeURIComponent(input); return { content: [ { type: 'text', text: encoded } ] }; } },

Other Tools

Related 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/MissionSquad/mcp-helper-tools'

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