Skip to main content
Glama

URL Encode / Decode

url_encode
Read-only

Percent-encode or decode text for use in URLs. Component scope escapes a single query/path piece (encodeURIComponent); full scope preserves URL delimiters (encodeURI).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>",
      "mode": "<mode>"
    },
    "name": "url_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesWhether to percent-encode the text or decode it.
textYesText to encode, or a percent-encoded string to decode.
scopeNoComponent: a single query/path piece (escapes &=/?#). Full: a whole URL (keeps delimiters). Defaults to component.component

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, non-destructive, and openWorldHint=false, so the safety profile is covered and the description only needs to add transformation context, which it does lightly. It does not say what happens when decoding malformed percent sequences (error vs passthrough), which is the one behavior an agent can't infer.

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?

Two sentences, zero filler, with the core action front-loaded and the scope nuance second. Every clause carries information the agent needs.

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

Completeness4/5

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

For a 3-parameter pure transformation with full schema coverage, the definition covers purpose and scope adequately, and the string return value is obvious enough not to need an output schema. The only real omission is decode-failure behavior.

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

Parameters3/5

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

Schema description coverage is 100% and each enum value is documented in the schema itself, so baseline 3 applies. The description's scope sentence parallels what the scope property description already says rather than adding new detail such as encoding specifics for spaces versus reserved characters.

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?

States a specific verb pair (percent-encode or decode) and resource (text for use in URLs), then immediately distinguishes the two operating scopes. An agent knows exactly what transformation happens and at what granularity.

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 scope clause effectively tells the agent which mode to pick for a single query/path piece versus a whole URL, but there is no guidance on when to reach for this tool versus siblings like base64 or slugify, and no note on inputs it should not be used for.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources