Skip to main content
Glama

url_encode

Percent-encode text for safe inclusion in URL query parameters or path segments. Converts special characters, spaces, and non-ASCII text to valid URL format.

Instructions

Percent-encode a string for safe inclusion in a URL query parameter or path segment (encodeURIComponent). Returns the encoded string. Has no side effects. Free. Use when building URLs that contain special characters, spaces, or non-ASCII text. Do NOT use to encode a full URL — only encode individual query values or path segments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to URL-encode.
Behavior4/5

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

Discloses no side effects and free cost, which is valuable since no annotations are provided. Could mention that the encoded string is returned, but the core behavioral traits are covered clearly.

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?

Two sentences with zero waste: first sentence states purpose and behavior, second gives usage guidelines. Every sentence earns its place, front-loaded with the key action.

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?

Given the tool's simplicity (1 param, no output schema), the description covers all necessary aspects: function, usage, side effects, cost, and parameter semantics. Complete for its complexity level.

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 100%, baseline 3. Description adds value by specifying the encoding algorithm (encodeURIComponent) and reiterating that the input is the text to encode, though the schema already describes it as 'The text to URL-encode.'

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?

Clearly states the verb 'percent-encode' and resource 'a string' with explicit purpose for safe URL inclusion. Distinguishes from sibling tools like url_decode by specifying encoding standard encodeURIComponent.

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?

Provides explicit when-to-use ('building URLs containing special characters, spaces, or non-ASCII text') and when-not-to-use ('do NOT encode a full URL'). Offers clear alternative guidance for encoding individual values only.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server