detect-format
Analyzes a user's request to determine the optimal document format—markdown, docx, excel, or pdf—based on intent, content, and keywords like 'README' or 'invoice'. Returns a creation plan with format, style, and tool recommendations.
Instructions
PLAN the best output format BEFORE creating. Call this FIRST whenever the user didn't explicitly name a format. It weighs explicit format words, what the user wants to DO with the file, topic, and content shape — then returns a ready-to-use creation plan. Nuance it captures: 'README / API / spec / for the repo' → markdown; 'budget / tracker / dataset / table' → excel (CSV if they say csv); 'editable / draft / template / in Word' → docx; 'print / send to the client / official / invoice / resume / final / sign' → PDF. DOCX = editable Word; PDF = final, fixed-layout, print/sign/send. Returns { format (markdown|docx|excel|pdf), suggestedTool, stylePreset, category, docType, confidence, reason, alternativeFormat, outputFormat? ('csv'), unsupported? ('pptx'), note? }. Pass these straight into the create-* tool. There is no native slides/PowerPoint tool yet — it recommends the closest fit (usually PDF) and flags unsupported:'pptx'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Document title if already chosen. | |
| content | No | Content preview if available — the more context, the better the routing. | |
| userQuery | Yes | The user's original request, verbatim if possible. |