Skip to content

feat(llm-tools): intent-based tool layer (SD-2166)#2329

Open
caio-pizzol wants to merge 5 commits intomainfrom
caio/sd-2166-redesign-llm-tools-intent-based-tool-layer
Open

feat(llm-tools): intent-based tool layer (SD-2166)#2329
caio-pizzol wants to merge 5 commits intomainfrom
caio/sd-2166-redesign-llm-tools-intent-based-tool-layer

Conversation

@caio-pizzol
Copy link
Contributor

No description provided.

Add packages/llm-tools with 13 intent-based tools that route to
Document API operations via a transport-agnostic executor interface.

Definitions: superdoc_read, superdoc_find, superdoc_edit,
superdoc_create, superdoc_format, superdoc_table, superdoc_list,
superdoc_image, superdoc_comment, superdoc_review, superdoc_section,
superdoc_reference, superdoc_control.

Routers align payloads with actual Document API contracts (field names,
nested structures, enum values). Shared parseTarget/trackedOptions
helpers reduce duplication across router files.

87 unit tests covering all routers and tool definitions.

SD-2166
@linear
Copy link

linear bot commented Mar 9, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b5f4ee5fa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…ontract

Fixes slot address for headerFooters.get, parses hyperlink/bookmark/footnote
IDs as JSON addresses, maps image wrap enums, uses block/inline kind for
content control wrap, and exposes correct merge/sort fields in table schema.
- Remove broken set_header_footer action (needs 2-step API not yet wired)
- Add kind validation to get_header_footer
- Fix update_link to only include href when defined, rename text→tooltip
- Add target validation for insert_bookmark/insert_footnote
- Collapse duplicate listings in definitions/router index files
- Remove unused type field from control schema
- Simplify routeFind duplicated branches
- Add 18 new tests covering all flagged gaps
- Fix nodeType→nodeKind mismatch in find router (find was returning all
  nodes instead of filtering by type)
- Add resolveTextTarget: auto-convert content addresses to text addresses
  in format and comment routers (eliminates manual address construction)
- Enrich find results with textAddress (full block range) and matchAddress
  (exact pattern match offset) so models can pass them directly to
  format/comment without character counting
- Add table set_cells action: batch-populate table cells from a 2D array
  (reduces 12+ individual insert calls to 1)
- Add multi-item list creation via items[] param (reduces 5 chained calls
  to 1)
- Fix format router to send booleans instead of 'on'/'off' strings
- Fix edit router to use input.value instead of input.text for insert

SD-2167
Replace 7 hand-written MCP tool handlers with a single intent-tools
module that delegates to the @superdoc/llm-tools router. Adds
json-schema-to-zod converter for runtime input validation.

Fixes find test to use correct SDFindInput shape (nodeKind, no query
wrapper).
@caio-pizzol caio-pizzol self-assigned this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant