Skip to main content
Glama

url_encode

Percent-encode text for use in a URL query value (encodeURIComponent) and as a full URL (encodeURI). Use when building query strings. Costs $0.001 in USDC on Base per successful call, paid with x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations cover the safety profile (destructiveHint=false, openWorldHint=true), and the description adds genuinely non-obvious context the annotations lack: the call costs $0.001 USDC on Base via x402 per successful call. It does not disclose output format or failure behavior, but the payment disclosure is the meaningful extra.

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?

Three short sentences, purpose front-loaded, then usage, then cost. Every sentence earns its place, though the two encoding modes and the usage trigger could be tightened into a single clearer sentence.

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

Completeness5/5

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

For a single-parameter, pure transform with annotations and no output schema, the description supplies purpose, both encoding modes, a usage trigger, and the payment model. Nothing an agent needs to invoke it correctly is missing.

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% with one required string parameter, so the schema already carries the parameter semantics. The description adds nothing beyond restating that text is encoded; baseline 3 applies when the schema does the heavy lifting.

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 (percent-encode) and resource (text), and disambiguates the two encoding modes via the concrete encoders encodeURIComponent and encodeURI. An agent can tell this apart from url_decode and url_parse by the verb alone.

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?

"Use when building query strings" gives a clear positive trigger, but there is no exclusion, no mention of when to pick the full-URL mode over the query-value mode, and no pointer to the sibling url_decode. The guidance is implied rather than explicit.

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