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.documentParseParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | ✓ | Document content (text or encoded) |
| operation | string | ✓ | extract_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.templateRenderParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| template | string | ✓ | Template string with {{placeholder}} syntax |
| variables | Record<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.textDiffParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| original | string | ✓ | Original text |
| modified | string | ✓ | Modified 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.markdownTableParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| headers | string[] | ✓ | Column header labels |
| rows | string[][] | ✓ | Array of row data arrays |
| alignment | string[] | — | Per-column alignment: left, center, right |
Returns
TypeScript
| Name | Revenue | Region |
|-------|----------|--------|
| Alpha | $50,000 | US |
| Beta | $75,000 | EU |
| Gamma | $30,000 | APAC |