Skip to main content
Glama

table_align

Fix ragged Markdown tables by realigning columns, correcting cell counts, and handling CJK character drift. Reads Markdown, CSV, TSV, JSON, or HTML and outputs clean, aligned Markdown with optional per-column alignment.

Instructions

Re-align a messy Markdown table so every column lines up.

Use this when a Markdown table is ragged, when pipes are not aligned in the source, when a row has the wrong number of cells, or when Chinese characters make the columns drift. This is a focused shortcut for table_convert(..., to_format="markdown"); it always outputs Markdown.

Args: text: The table as text. Defaults to reading it as Markdown. from_format: How to read the input. markdown, csv, tsv, json or html. aligns: Per-column alignment, e.g. "left,right", or a single value. Empty means no explicit alignment markers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
alignsNo
from_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the output format (Markdown) and the transformation nature, but does not mention edge cases, side effects, or how it handles malformed input beyond 'wrong number of cells.' It gives enough to be safe but not exhaustive, so a 3 is appropriate.

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 a front-loaded purpose, explicit usage triggers, and a clean Args block. It is efficient but includes a few redundant clarifications (e.g., 'Defaults to reading it as Markdown' appears twice), which slightly reduces conciseness.

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?

For a 3-parameter tool with an output schema present, the description covers purpose, usage, parameters, and output format. It omits only minor details like error behavior or whether the original table is preserved, which are not critical for a straightforward transformation tool.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does thoroughly. The Args section explains each parameter: text's default reading as Markdown, from_format's accepted values, and aligns' per-column syntax with the meaning of empty. This fully compensates for the schema gap.

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 opens with a clear, specific verb and resource: 'Re-align a messy Markdown table so every column lines up.' It explicitly differentiates from siblings by calling itself a focused shortcut for table_convert(..., to_format='markdown'), making its scope unmistakable.

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?

The description provides explicit conditions for use ('when a Markdown table is ragged, when pipes are not aligned...') and names the alternative (table_convert) with a clear distinction (always outputs Markdown). This leaves no ambiguity about when to select this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.