Skip to main content
Glama

Agent Data Tools: Utilities

URL encode

url_encode

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.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the payment model ($0.003/call via x402 USDC or card key, first 25 free, failed calls free) and explicitly reconciling the readOnlyHint=false annotation (compute-only, but not marked read-only because each call is charged). This is exactly the kind of non-obvious behavior an agent needs.

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?

Purpose is front-loaded in the first clause, and each subsequent sentence adds distinct information (modes, trigger context, pricing, read-only rationale). The mid-sentence example is slightly awkward, keeping it from a 5.

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 one-parameter compute tool with annotations covering the safety profile, the description covers purpose, payment, and the read-only caveat. The only minor gap is that the return value (the encoded string) is not stated, but with no output schema and such a trivial result this is nearly negligible.

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?

Only one parameter and schema description coverage is 100%, so the schema already documents "text." The inline example (text=a b&c=d/é) hints at input shape but is not formal syntax or format guidance beyond what the schema provides; baseline 3 applies.

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 for URLs), and distinguishes the two modes: encodeURIComponent for query values vs encodeURI for full URLs. This lets an agent tell what it does apart from siblings like url_decode and url_parse without opening schemas.

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 explicit context: "Use when building query strings," plus the two supported output modes. It does not name url_decode as the inverse alternative or exclude any scenarios, so it is clear but lacks the exclusions/alternatives that would earn a 5.

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.