validate_expertise
Dry-run validation of an expertise definition. No data is written. Returns blocking errors and non-blocking warnings (routing mistakes, and design notes such as steps that could be merged: every step is a separate agent round trip, so prefer fewer steps). Always call this before create_expertise to catch schema errors early.
SCHEMA REFERENCE Each node needs: id (local string ref), title, type (step|terminal|invoke), instruction, and optionally expected_output, is_entry (bool), included_skills, and (for type invoke) invoke_expertise_code. expected_output format: {"field_name": {"hint": "boolean|string|number", "values": ["opt1", "opt2"]}}. Example: {"verdict": {"hint": "string", "values": ["approved", "rejected", "escalate"]}}. IMPORTANT: field names in expected_output must exactly match the condition.field values on outgoing edges — mismatches silently fall to the default edge at runtime. included_skills format: array of node-id strings, each the node ID of an existing single-node "skill" expertise (one you or someone else already created). That skill's instruction gets injected as shared context when this node runs — use it to reuse a maintained skill across many trees instead of copy-pasting its instructions. To find a skill's node ID, call edit_expertise(code="SKILLCODE") in read mode (omit tree) and use the returned node's id. invoke node type — COMPOSABILITY: a node of type 'invoke' runs a whole OTHER expertise as this step, not just its text. Set invoke_expertise_code to that expertise's code (e.g. 'ABC123'). At runtime the executing agent is transparently handed the sub-expertise's entry-node prompt under a NEW run_id; it keeps calling next_step exactly as usual (same mental model as any other run) until the sub-expertise reaches a terminal, at which point its result automatically folds back and the ORIGINAL run resumes in the same reply. CRITICAL: an invoke node's own outgoing edge conditions must match the field names from the SUB-EXPERTISE'S EXIT TERMINAL's expected_output — not the invoke node's own expected_output (nothing is ever submitted 'for' the invoke node itself). Any expertise you invoke remains fully runnable standalone, unchanged — composing it into a bigger tree never affects that. Avoid designing a sub-expertise whose entry can fan out to multiple terminals at once if it will be used as an invoke target — only the first terminal reached actually returns a result to the caller (validate_expertise warns about this shape). Each edge needs: from (node id), to (node id), and either a condition object {field, operator, value} or is_default: true. Valid operators: eq, neq, gt, gte, lt, lte, in, contains, exists, is_null. Rules: exactly one node must have is_entry:true. Every step and invoke node must have at least one outgoing edge and one default edge. Terminals have no outgoing edges. Fan-out (multiple matching edges from one node) is supported and queued automatically.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tree": "<tree>"
},
"name": "validate_expertise"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tree | Yes | The expertise definition to validate. Same schema as create_expertise. |