Skip to main content
Glama

mcpforx

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

NameRequiredDescriptionDefault
treeYesThe expertise definition to validate. Same schema as create_expertise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does so: it declares the operation is a dry run with no writes, specifies the return shape (blocking errors vs non-blocking warnings, routing mistakes, design notes), and explains non-obvious runtime consequences such as invoke nodes resuming the original run and the fan-out warning. That is well beyond what any structured field states.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose, the no-write guarantee, and the create_expertise call-to-action are correctly front-loaded in the first two sentences. But the remaining bulk is a schema manual that largely restates the input schema's own field descriptions, burying the two high-value warnings (field-name mismatch, invoke edge conditions) inside a long block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a deeply nested single-parameter tool with no output schema, the description covers what comes back (errors vs warnings, with example categories), the invariants that will be validated (one entry node, default edges, terminal edge rules, valid operators), and the pitfalls that produce warnings. Nothing an agent needs in order to call it and interpret results is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single 'tree' parameter is already documented field-by-field, so much of the SCHEMA REFERENCE block is duplicative. However, it adds genuine cross-field semantics the schema cannot express on its own — that expected_output field names must exactly match condition.field values or edges silently fall to default, and that an invoke node's edge conditions must match the sub-expertise's exit terminal rather than its own expected_output.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Dry-run validation of an expertise definition') and immediately distinguishes itself from the write path by noting 'No data is written' and naming create_expertise as the sibling it precedes. An agent can tell this apart from create_expertise/edit_expertise without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit, near-mandatory usage rule: 'Always call this before create_expertise to catch schema errors early.' It also indirectly routes to edit_expertise(code) in read mode as the way to look up skill node IDs, so the agent knows where this tool stops and a sibling begins.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources