Tools Reference

Documents

Four tools for parsing documents, rendering templates, comparing text, and generating tables.


document_parse Standard

Parse and extract structured information from documents (text, PDF content, etc.). Supports multiple extraction operations.

TypeScript
tools.documentParse

Parameters

ParameterTypeRequiredDescription
contentstringDocument content (text or encoded)
operationstringextract_text, extract_tables, extract_metadata, extract_sections, summarize, extract_entities

Operations

  • extract_text — Full text extraction
  • extract_tables — Find and extract tables
  • extract_metadata — Title, author, dates, etc.
  • extract_sections — Heading-based section extraction
  • summarize — Key points summary
  • extract_entities — Named entities (people, orgs, dates, amounts)

template_render Standard

Render templates with variable substitution. Supports {{variable}} placeholder syntax.

TypeScript
tools.templateRender

Parameters

ParameterTypeRequiredDescription
templatestringTemplate string with {{placeholder}} syntax
variablesRecord<string, string>Key-value pairs for substitution

Example

TypeScript
{
  name: "template_render",
  args: {
    template: "Dear {{name}},\n\nYour report for {{month}} is ready.\n\nTotal: {{total}}",
    variables: {
      name: "Alice",
      month: "October 2024",
      total: "$12,450"
    }
  }
}
// Result: "Dear Alice,\n\nYour report for October 2024 is ready.\n\nTotal: $12,450"

text_diff Standard

Compare two pieces of text and produce a diff showing additions, deletions, and unchanged regions. Useful for document comparison, code review, and version tracking.

TypeScript
tools.textDiff

Parameters

ParameterTypeRequiredDescription
originalstringOriginal text
modifiedstringModified text to compare against

Returns

TypeScript
{
  changes: [
    { type: "unchanged", value: "Line 1\n" },
    { type: "removed", value: "Old line 2\n" },
    { type: "added", value: "New line 2\n" },
    { type: "unchanged", value: "Line 3\n" },
  ],
  stats: {
    additions: 1,
    deletions: 1,
    unchanged: 2
  }
}

markdown_table Free

Generate formatted markdown tables from structured data. Great for presenting data in chat responses.

TypeScript
tools.markdownTable

Parameters

ParameterTypeRequiredDescription
headersstring[]Column header labels
rowsstring[][]Array of row data arrays
alignmentstring[]Per-column alignment: left, center, right

Returns

TypeScript
| Name  | Revenue  | Region |
|-------|----------|--------|
| Alpha | $50,000  | US     |
| Beta  | $75,000  | EU     |
| Gamma | $30,000  | APAC   |

Next Steps