Skip to main content
Glama

Agent Data Tools: Utilities

URL encode: percent-encode text for use in a URL

url_encode
Read-only

Percent-encode text for use in a URL query value (encodeURIComponent) and as a full URL (encodeURI). Use when building query strings. Example: text=a b&c=d/é. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, non-idempotent, and closed-world, so the safety profile is covered. The description's real value-add is the billing model (per-call charge via x402/card key, first 10 free, failed calls free), which explains why repeats are costly. Beyond pricing it adds little — notably it never says whether one call returns both encodings or which one.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the two encoding modes in the first sentence, then usage, then example, then cost. It is dense but every sentence carries information; the pricing clause is long but operationally relevant.

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

Completeness3/5

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

With no output schema, the description should indicate what comes back, and it does not — an agent cannot tell whether the result is one string or both encodings. The billing and safety context is complete, but the return-value gap and the unresolved mode selection leave meaningful ambiguity for a tool this simple.

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% for the single 'text' parameter, so the baseline is 3. The example 'text=a b&c=d/é' illustrates which characters get encoded, but the description never resolves how the caller picks between encodeURIComponent and encodeURI when there is no mode parameter.

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?

States a specific verb and resource: 'Percent-encode text for use in a URL query value (encodeURIComponent) and as a full URL (encodeURI).' It names the two encoding modes precisely, which an agent can act on. It stops short of naming siblings like url_decode or base64_encode to differentiate itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context: 'Use when building query strings,' and distinguishes query-value encoding from full-URL encoding. It offers no explicit when-not guidance (e.g., use url_decode for the reverse, base64_encode for binary payloads), so the agent must infer alternatives.

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