Skip to main content
Glama

url_encode

Percent-encode text for a URL or query string, or decode it back, with component or full-URL modes. Pure CPU, instant.

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>"
    },
    "name": "url_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNocomponent or uri
textYesText to encode or decode
decodeNoDecode instead of encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed4 schema fields changed
    • addedInput schema / properties / decode
      Added value: +{
      +  "description": "Decode instead of encode",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "component or uri",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Text to encode or decode",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "text"
      +]
  4. Added

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden; it does usefully disclose that the operation is 'pure CPU, instant' and therefore side-effect free and non-network. It does not state what happens on malformed input (e.g. an invalid percent sequence when decoding), whether output is ever truncated, or that it is a stateless transform with no persistence.

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?

A single sentence with the core action front-loaded, followed by a short cost/latency note. No filler, no repetition of the tool name, and every clause carries information.

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 three-parameter, single-transform tool with full schema coverage and no output schema required, the description covers direction, target domain, and mode granularity, which is enough to call it correctly. Only edge-case behavior for invalid input is left unstated.

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 coverage is 100%, so the baseline is 3 and the schema already documents all three parameters. The description adds modest meaning by explaining that mode selects component versus full-URL behavior and that decode inverts encoding, which clarifies the otherwise terse 'component or uri' schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (percent-encode) and resource (URL / query string) and explicitly covers the inverse operation (decode). It is clearly distinct from sibling encoders like base64 or html_entities because it scopes to URL percent-encoding, though it never names a sibling to route against.

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?

Usage context is implied by 'for a URL or query string' and the mention of component versus full-URL modes, so an agent can infer that the mode should match whether it is encoding a single value or a whole URI. There is no explicit when-to-use/when-not guidance and no alternatives for related tasks (e.g. html_entities, base64) are referenced.

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