Skip to main content
Glama

convert_encoding

Convert a file's encoding to a specified character set. Auto-detects source encoding and rewrites the file in the target encoding.

Instructions

Converts a file's encoding to a different character set. Reads the file with auto-detected encoding, then rewrites it in the target encoding. Supports: UTF-8, UTF-8-BOM, EUC-KR, Shift_JIS, ISO-8859-1, UTF-16, ASCII, Windows-1252, Big5, GB18030. Example: convert EUC-KR file to UTF-8, or add/remove UTF-8 BOM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoAbsolute path to the file to convert
pathNoAlias for file_path
to_encodingYesTarget encoding. Examples: UTF-8, UTF-8-BOM, EUC-KR, Shift_JIS, ISO-8859-1
Behavior3/5

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

The description discloses that the file is read with auto-detected encoding and rewritten with the target encoding, which is key behavioral information. However, it does not specify whether the operation is destructive (overwrites original), what happens on failure, or behavior with unsupported encodings. Given no annotations, some transparency is provided but gaps remain.

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 concise, using two sentences plus a bullet list and an example. Every sentence adds value without redundancy. It is well-structured and easy to parse for an AI agent.

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

Completeness3/5

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

The description lacks information about return values (e.g., success status, error messages) and does not cover edge cases like file size limits or encoding detection accuracy. However, for a simple conversion tool with a clear purpose, the description provides adequate context for basic use.

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 input schema covers 100% of parameters with minimal descriptions. The tool description adds meaningful context by explaining the auto-detection process and listing supported encodings beyond the schema examples. This helps the agent understand the role of 'to_encoding' and the effect of the operation.

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 'Converts a file's encoding to a different character set,' providing a specific verb and resource. It distinguishes this tool from siblings like compress, copy, or edit by focusing on encoding conversion. The example further clarifies the purpose.

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?

The description implies usage for converting file encodings and provides an example, but it does not explicitly state when to use this tool versus alternatives or when not to use it. There is no mention of prerequisites or excluded scenarios, which would improve guidance.

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/knewstimek/agent-tool'

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