Skip to main content
Glama

url_encode

Apply encodeURIComponent-style percent-encoding so query parameters, path segments, or form values are safe to place in a URL.

Use when:

  • Percent-encode this string for a query parameter

  • Make a path segment URL-safe with encodeURIComponent-style encoding

  • Encode special characters before inserting text into a URL

Do not use when:

  • Decode a percent-encoded string (use url_decode)

  • Encode binary data as Base64 (use base64_encode)

  • Build or rewrite a full absolute URL structure beyond component encoding

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden. It discloses the encoding style (encodeURIComponent-style) and the intended purpose (URL safety). It doesn't detail edge cases or return value, but for a pure encoder this is sufficient behavioral context.

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?

The description is perfectly sized: one-sentence summary followed by short bullet lists. Every line earns its place, and the structure front-loads the core message.

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 simple one-parameter utility with no output schema, the description fully covers purpose, usage, and exclusions. No additional context is needed for an agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate. It refers to 'this string' and 'text' in the use cases, making it clear that the single 'value' parameter is the string to encode. It adds contextual meaning beyond the schema despite not having a dedicated param description.

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?

The description clearly states the tool applies encodeURIComponent-style percent-encoding to make strings URL-safe, with a specific verb, resource, and purpose. It distinguishes itself from siblings by explicitly naming url_decode and base64_encode as alternatives.

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

Usage Guidelines5/5

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

The description provides explicit 'Use when' and 'Do not use when' sections, listing concrete scenarios and naming the appropriate alternative tools. This is exactly the level of guidance needed.

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