Skip to content

Validate complete decision-tree node shapes before MCP persistence #87

Description

@jamditis

Problem

The LLM Advisor Data MCP server validates only the outer decision-node shape before persisting a new node. Nested options are accepted without enforcing the browser application's actual contract.

For example, a schema-valid option containing "tools": [] can be written successfully, but the browser later dereferences option.tools[0].name while populating the workflow selector. That aborts advisor initialization for every visitor. Other malformed nested tools values can also reach rendering code.

This was identified in the capped round-nine review of branch agent/tools-impact-burndown and is intentionally deferred from that issue-burndown PR.

Acceptance criteria

  • Define and enforce the complete nested decision-tree option/tool shape before persistence.
  • Reject empty or malformed tools arrays and unsupported fields.
  • Validate both existing file contents and add_decision_node inputs against the same contract.
  • Add regression tests proving malformed nested options cannot be persisted.
  • Confirm valid existing decision-tree data still loads and the browser advisor initializes successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions