bootspring_brain

MCP tool for natural language routing — automatically dispatch queries to the right Bootspring capability

The bootspring_brain MCP tool gives AI coding assistants direct access to Bootspring's NLU routing engine. Instead of requiring users to know exact command names, the brain interprets natural language and dispatches to the best matching skill, workflow, agent, or pipeline target.

Overview

When integrated with an AI assistant (Claude Code, Cursor, Codex, etc.), the brain tool enables natural conversations that automatically invoke the right Bootspring capability.

User: "I want to check if this project is ready to ship" AI Assistant invokes: bootspring_brain → query: "check if this project is ready to ship" Brain returns: → target: deploy-readiness (skill) → confidence: 0.89 → command: bootspring deploy check AI Assistant runs the command and reports results.

Tool Schema

Loading code block...

Input Parameters

ParameterTypeRequiredDefaultDescription
querystringYesNatural language query (1-500 characters)
autoDispatchbooleanNofalseIf true, invoke the matched target when confidence exceeds the auto-dispatch threshold
contextstringNoOptional context to improve routing accuracy (up to 2000 characters)

Output Format

Successful Route

Loading code block...

Low Confidence (Below minConfidence)

Loading code block...

Auto-Dispatch Result

When autoDispatch is true and confidence exceeds the threshold (default 0.85):

Loading code block...

When confidence is below the threshold, dispatched is false and the result includes the match but does not invoke it:

Loading code block...

Integration with AI Assistants

Claude Code

The brain tool is registered automatically when Bootspring MCP is configured. Claude Code can invoke it in two ways:

Implicit — Claude recognizes when a user request maps to a Bootspring capability and invokes the brain behind the scenes:

User: "Can you check if there are any anti-patterns in my session?" Claude invokes bootspring_brain: query: "check for anti-patterns in my session" → target: observer-patterns → confidence: 0.93 → command: bootspring observer patterns Claude then runs the command and interprets the results.

Explicit — The user can ask Claude to use the brain directly:

User: "Use bootspring_brain to figure out what command handles cost optimization" Claude invokes bootspring_brain: query: "cost optimization" → target: cost-optimizer (skill) → confidence: 0.90

Cursor / Codex / Other MCP Clients

Any MCP-compatible client can invoke bootspring_brain with the same schema. The tool is listed in the MCP tool manifest alongside all other Bootspring tools.

Auto-Dispatch Behavior

Auto-dispatch controls whether the brain invokes the matched target or only returns the routing result.

autoDispatchConfidenceBehavior
falseAnyReturn match only, never invoke
true>= 0.85Invoke target, return match + result
true< 0.85Return match only with confidence warning

The auto-dispatch threshold is configurable server-side (default: 0.85). When a target is auto-dispatched, the dispatched field is true and the result field contains the output of the invoked command.

Example Conversations

Build Loop

User: "What's my build progress?" bootspring_brain → query: "What's my build progress?" → target: build-loop (skill), confidence: 0.94 AI runs: bootspring build status AI responds: "You've completed 66 out of 114 tasks (58%). Currently working on bs-1078."

Code Review

User: "Review the auth module for issues" bootspring_brain → query: "Review the auth module for issues" → target: code-review (workflow), confidence: 0.87 AI runs: bootspring workflow run code-review AI responds with the review results.

Ambiguous Query

User: "Help me with the project" bootspring_brain → query: "Help me with the project" → target: null, confidence below threshold AI responds: "I wasn't sure what you'd like to do. Here are some options: - 'Check build progress' → build status - 'Review code quality' → quality gates - 'View session analytics' → observer dashboard What would you like?"

Multi-Step with Context

User: "I just finished the auth feature, what should I do next?" bootspring_brain → query: "finished auth feature, what next" context: "Current task: bs-1042, status: in_progress" → target: build-loop (skill), confidence: 0.91 AI runs: bootspring build done AI runs: bootspring build next AI responds: "Marked bs-1042 as complete. Your next task is bs-1043: Implement rate limiting middleware."

Error Handling

Error CodeCauseResponse
BRAIN_NOT_READYBrain still loading targets on startupRetry after 1-2 seconds
QUERY_TOO_LONGQuery exceeds 500 charactersShorten the query
DISPATCH_FAILEDAuto-dispatch target returned an errorMatch is returned with the dispatch error
NO_TARGETSNo skills, workflows, or agents are configuredRun bootspring setup