create_expertise
Create a new expertise in your mcpforx library. Can produce a skill (single node), sequence (linear nodes), or decision tree (conditional edges) depending on the structure you provide. Canvas layout is computed automatically — do not specify coordinates.
WORKFLOW: design the expertise → call validate_expertise → fix any errors → call create_expertise. Returns the expertise name and code.
EXECUTION MODEL When an agent runs this expertise, each step node's instruction is sent as a prompt to the executing agent. The executing agent must return a JSON object whose keys match the node's expected_output fields — those field values are what edge conditions evaluate for routing. Design instructions to explicitly tell the executing agent what to decide and what to put in each output field. Example: 'Assess the proposal and return verdict as one of: approved, rejected, escalate.'
DESIGN PRINCIPLES
Entry node: one step node with is_entry:true. Collects the input or classifies it.
Branch nodes: step nodes that score/assess and output a rollup field used for routing.
Terminal nodes: end nodes with no outgoing edges. Produce final output.
Route edges off a single rollup field (one eq/contains condition per edge). For compound logic, encode it in the node instruction as a rollup, then route off that.
Fan-out: multiple conditional edges from one node ALL fire when matched — extras queue and run sequentially. Use this for parallel branches (e.g. per cap size).
Every step node needs a default edge as a fallback (is_default:true).
BE PARSIMONIOUS. Every step an agent passes through is a separate round trip: a full agent turn (several seconds) that also re-reads the growing conversation. Use the fewest steps that still need to be steps. A step earns its place only if (a) it routes the run to different next steps, (b) the agent must complete it before it is allowed to see what comes next (a deliberate gate or checkpoint), or (c) its instructions are too large or too situational to give up front. Otherwise merge consecutive steps that do not route into ONE step with a numbered list of what to do. Do not add a step only to 'gather input' that the entry step can ask for, or a final 'summarise' step the last terminal can do. Included skills are injected in full at the step that lists them, so list only the skills that step needs; when a step would carry several skills the agent will mostly not use, route to a step that carries just the relevant ones instead.
As few nodes as work: 3–8 is typical and more than about 10 is rarely justified. Instructions should be explicit: define terms, give decision rules, end with 'if X → output A; if Y → output B' blocks.
HOW-TO EXAMPLES (strongly recommended) Include a how_to object with 2-3 example prompts so users know how to invoke the expertise. Each scenario should cover a distinct path through the tree (e.g. one per major branch). Format: { intro: '1-sentence overview', scenarios: [{ label, description, prompt }] }. The prompt should be a ready-to-paste message a user would send to their AI agent.
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": "create_expertise"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tree | Yes | The complete expertise definition. Same schema as validate_expertise. |