Skip to main content
Glama

url_encode

Percent-encode text to safely include special characters, spaces, or non-ASCII text in URL query parameters and path segments. Prevents URL parsing errors.

Instructions

Percent-encode a string for safe inclusion in a URL query parameter or path segment (encodeURIComponent). Use when building URLs that contain special characters, spaces, or non-ASCII text.

Input Schema

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

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

With no annotations provided, the description carries the burden of behavioral disclosure. It mentions using encodeURIComponent and the safe inclusion context, but it does not detail edge cases, error handling, or the exact set of characters encoded. Adequate but leaves room for more detail.

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 extremely concise—two sentences that front-load the action and purpose. Every word adds value with no redundancy or filler.

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 encoding tool with no output schema, the description is complete. It explains the operation, use case, and encoding standard, leaving no critical gaps for the agent.

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?

The schema covers the single parameter 'text' with a description. The tool's description adds context about what the encoding applies to (special characters, spaces, non-ASCII), providing value beyond the schema. Given 100% schema coverage, this extra context justifies a score above baseline 3.

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 explicitly states the verb (Percent-encode), the resource (a string), and the purpose (safe inclusion in URL query parameter or path segment). It references encodeURIComponent for precision, clearly distinguishing from sibling tools like url_decode.

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?

The description advises using the tool when building URLs containing special characters, spaces, or non-ASCII text. This provides clear context for when to use it, though it does not explicitly exclude alternative scenarios or list alternative tools.

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