Architecture pattern
The recommended integration is schema-aware and tool-driven:
- Expose metadata as a discovery tool.
- Expose write operations as controlled tools.
- Let the model call tools in sequence: inspect schema, ask for missing fields, submit validated payload.
Why dynamic tools matter
- New fields in Snello metadata become available to AI flows without backend code rewrites.
- The assistant reduces hallucinations by relying on real schema definitions.
- Validation can happen before write calls by matching payload keys against metadata fields.
Suggested tool contract
getSchema(entityName)
upsertContent(entityName, jsonData)
listContent(entityName, filters)
Keep tools narrowly scoped and explicit in responsibility so you can audit usage and errors.
Operational flow
- User asks to create or update content.
- Assistant calls getSchema for the target entity.
- Assistant requests missing required values from user.
- Assistant sends a final structured payload through upsertContent.
System prompt guidance
Instruct the assistant to always query schema before writes and to reject unknown fields. This significantly improves consistency and safety.