Skip to main content
Glama

ptx

Read-only

Generate a permuted (keyword-in-context) index from input text, displaying each word in its surrounding context for searchable cross-references.

Instructions

Build a permuted (keyword-in-context) index from input text, showing each word in its surrounding context. Read-only, no side effects. Returns JSON with the index by default; use --raw for plain output. Use to create searchable cross-reference indices. Not for sorting or deduplication — use 'sort' and 'uniq'. See also 'sort'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoWords of left/right context.
encodingNoText encoding.utf-8
ignoreNoIgnore a keyword. Repeatable.
ignore_caseNoCompare filters case-insensitively.
max_linesNoMaximum JSON records to emit.
onlyNoOnly include this keyword. Repeatable.
pathsNoFiles to index, or '-' for stdin. Defaults to stdin.
rawNoWrite index rows without a JSON envelope.
Behavior4/5

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

Annotations already indicate readOnlyHint=true, so the description's statement of 'Read-only, no side effects' aligns. Beyond that, it adds useful context about output format (JSON default, --raw for plain), which aids agent understanding of behavior.

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 at about 5 sentences, each adding value. It front-loads the core purpose, then covers safety, output format, and usage advice. No wasted words.

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 moderate complexity, full schema parameter descriptions, and explanation of output format and alternatives, the description provides complete context for an agent to select and use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions, so baseline is 3. The description only mentions --raw explicitly but adds minimal extra meaning beyond schema.

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 the tool builds a permuted (keyword-in-context) index, specifies the verb 'Build' and the resource, and distinguishes from siblings by mentioning it is for indexing, not sorting or deduplication.

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 tells when to use ('create searchable cross-reference indices'), when not to use ('Not for sorting or deduplication'), and provides alternative tools ('use 'sort' and 'uniq'). Also references 'sort' for further 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/caseSHY/AI-CLI'

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