Skip to main content
Glama
davidfstr
by davidfstr

indent_dedent

Adjust indentation of code blocks by marking boundaries with ⬥ and specifying a delta. Works on a range of lines in a file.

Instructions

Indents or unindents a range of lines in a file.

Specify the range using substring matching with a ⬥ marker. The ⬥ identifies which line is the boundary — the full line containing the ⬥ is included in the range.

Common pattern — indent a block, then wrap it: 1. indent_dedent(indentStartAt="# Create home URL\n⬥", ..., indentDelta=1) 2. replace_string_in_file to insert "if True:" before the indented block

⬥ in boundaries anywhere on a line marks the line to indent when the context contains multiple lines. No ⬥ is needed if the context is within a single line only.

Whitespace at the end of lines is ignored when matching substrings.

Empty lines within the range are left unchanged (no whitespace added). Non-empty lines (including whitespace-only lines) are indented/unindented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYes
indentStartAtYes
indentEndAtYes
indentDeltaYes
indentSizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: substring matching with ⬥ marker, ignoring trailing whitespace, leaving empty lines unchanged, and indenting/unindenting non-empty lines. While it does not cover error cases or persistence details, it provides substantial behavioral context.

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 structured with bullet points and an example, front-loading the purpose. It is appropriately sized for the complexity of the tool, though it could be slightly more concise by removing the common pattern commentary.

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

Completeness4/5

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

Given that an output schema exists, description does not need to cover return values. It explains the main parameters and behavior adequately. However, it lacks error handling or edge cases (e.g., substring not found), slightly reducing completeness.

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 has 0% description coverage, so the description must add meaning. It explains the role of indentStartAt and indentEndAt as substring markers, and the indentDelta parameter via example (indentDelta=1). It does not fully explain indentSize or the sign of indentDelta, but it compensates for the lack of schema descriptions.

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 'Indents or unindents a range of lines in a file', specifying the verb (indent/unindent) and resource (lines in a file). This clearly distinguishes it from sibling tools like move_string_in_file or outline_file, which have different purposes.

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 explains how to specify the range using substring matching with the ⬥ marker, and provides a common pattern example with a follow-up step. It gives clear context for usage, though it lacks explicit exclusions or when-not-to-use scenarios.

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/davidfstr/revise-mcp'

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