Tool schema normalization for memory providers #715

Closed
opened 2026-10-27 13:37:27 +00:00 by sam · 0 comments
Owner

Implement tool schema normalization that handles both bare tools (just Function definition) and wrapped OpenAI-style tool schemas from memory providers. Ensures all provider-exported tools are normalized to a consistent format before being merged into the agent's tool list.

Acceptance Criteria

Normalizer package detects whether a schema is bare (map with 'name' top-level) or wrapped (map with 'type':'function', 'function':{...})
Converts both formats to a canonical internal representation
Handles edge cases: missing required fields, extra unknown fields
Schema normalization happens at registration time, not per-turn
Errors on truly invalid schemas with clear messages
Round-trips through JSON marshal/unmarshal


Imported from beads archie-core-1786637494784-190-fb7ac8fd · GitHub #211 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08

Implement tool schema normalization that handles both bare tools (just Function definition) and wrapped OpenAI-style tool schemas from memory providers. Ensures all provider-exported tools are normalized to a consistent format before being merged into the agent's tool list. ### Acceptance Criteria Normalizer package detects whether a schema is bare (map with 'name' top-level) or wrapped (map with 'type':'function', 'function':{...}) Converts both formats to a canonical internal representation Handles edge cases: missing required fields, extra unknown fields Schema normalization happens at registration time, not per-turn Errors on truly invalid schemas with clear messages Round-trips through JSON marshal/unmarshal --- _Imported from beads `archie-core-1786637494784-190-fb7ac8fd` · GitHub #211 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumtask labels 2026-10-27 13:37:27 +00:00
sam self-assigned this 2026-10-27 13:37:27 +00:00
sam closed this issue 2026-10-27 13:37:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#715