Skip to main content
Glama

cut

Read-only

Select specific fields, characters, or bytes from each line of text. Extract columns from delimited data using field, byte, or character ranges, with results returned as JSON or plain text.

Instructions

Select specific fields, characters, or bytes from each input line. Read-only, no side effects. Returns JSON with the extracted columns by default; use --raw for plain text. Use to extract columns from tabular or delimited data. Not for replacing characters — use 'tr' for translation/deletion. Not for merging columns — use 'paste'. See also 'paste', 'tr'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesNo1-based byte ranges like '1,3-5'.
charsNo1-based character ranges like '1,3-5'.
delimiterNoField delimiter.
encodingNoText encoding.utf-8
fieldsNo1-based field ranges like '1,3-5'.
max_linesNoMaximum JSON lines to emit.
output_delimiterNoDelimiter for selected fields.
pathsNoFiles to read, or '-' for stdin. Defaults to stdin.
rawNoWrite plain transformed text to stdout.
Behavior5/5

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

Description adds value beyond readOnlyHint by stating no side effects and explaining default JSON output with raw option, providing behavioral details not covered by annotations.

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?

Very concise with no redundant sentences; essential information is front-loaded and each sentence adds value.

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 9 parameters and no output schema, the description adequately covers purpose, usage, output format, and exclusions, leaving minimal 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?

Schema coverage is 100% so baseline is 3; description adds contextual nuance like default JSON output and role of raw flag, slightly enhancing understanding.

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?

Description uses specific verbs (select) and resources (fields, characters, bytes) and clearly distinguishes from siblings like 'tr' and 'paste' by stating what the tool does not do.

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?

Explicitly states when to use (extract columns from delimited data) and when not to use (not for replacing or merging), and names alternatives (tr, paste).

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/caseSHY/AI-CLI'

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