Skip to main content
Glama

csv_ops

Preview CSV files, convert CSV to XLSX, and export XLSX to CSV with configurable delimiters and encodings.

Instructions

CSV helper operations: preview CSV, convert CSV→XLSX, and export XLSX→CSV.

Args: action: "preview", "to_xlsx", or "to_csv". - "preview": requires file_path (CSV path); returns a small preview as dict. - "to_xlsx": requires csv_path (or file_path) and xlsx_path (or output_path). - "to_csv": requires file_path (XLSX) and output_path (CSV destination). file_path, csv_path, xlsx_path, output_path: Path parameters as described above. sheet_name: Sheet to export when converting XLSX→CSV. rows: Number of preview rows to return. delimiter, encoding: CSV parameters.

Returns: dict or str: Preview dict for "preview" or destination path for conversions.

Raises: ValueError: If required path parameters are missing for the selected action.

Notes: - "to_xlsx" and "to_csv" perform file writes; document whether they overwrite existing files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNo
actionYes
csv_pathNo
encodingNoutf-8
delimiterNo,
file_pathNo
xlsx_pathNo
sheet_nameNoSheet1
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

There are no annotations, so the description carries the full burden. It discloses that 'to_xlsx' and 'to_csv' perform file writes and that ValueError is raised for missing paths. However, the note 'document whether they overwrite existing files' is a meta-instruction rather than an actual disclosure: it never states whether existing files are overwritten. This leaves a critical side-effect ambiguous, and for a mutation action this is a notable transparency gap.

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?

The description is well-structured with clear sections for purpose, args, returns, raises, and notes. The content is fairly concise for a tool with multiple actions and 9 parameters. The only slight issue is the final note, which is written as a reminder to document overwrite behavior instead of documenting it directly, adding a bit of noise.

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 covers the various actions, required parameters, return values, and error conditions, making it usable for most scenarios. However, the overwrite behavior is explicitly left undocumented, and details about the preview dict's structure rely on the output schema (which is present). This is a meaningful completeness gap for a file-writing tool, so it falls short of being fully complete.

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?

With schema description coverage at 0%, the description compensates by mapping parameters to actions: it explains that file_path is used for preview and to_csv, that csv_path and file_path are interchangeable for to_xlsx, and that sheet_name, rows, delimiter, and encoding have specific roles. While it doesn't dive deeply into all parameter value formats, it covers the essential conditional dependencies and provides enough context for an agent to pick the right arguments.

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 'CSV helper operations: preview CSV, convert CSV→XLSX, and export XLSX→CSV' and then enumerates the three specific actions. This gives a concrete verb+resource pairing for each operation and distinguishes csv_ops from sibling tools that handle XLSX workbooks or other formatting tasks.

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 provides action-specific parameter requirements, e.g., 'preview' requires file_path, 'to_xlsx' requires csv_path (or file_path) and xlsx_path (or output_path), and 'to_csv' requires file_path and output_path. This clearly implies when each action should be used. It does not explicitly mention alternative tools or when not to use the tool, so it does not reach a 5.

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/mbeps/excel-mcp'

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