Skip to main content
Glama
Vision-Stack20

kassi-CLI

Take one FSM transition

step
Destructive

Advance a load-testing pipeline stage by stage by executing one action at a time with required inputs, validating each transition to keep the workflow on track.

Instructions

Advance the FSM by one transition.

        Args:
            action: Name of the action to run. Must be in the
                current valid-next set; otherwise the call returns
                an ``invalid_transition`` error with the list of
                actions actually allowed right now.
            inputs: Keyword inputs to the action. Each action
                declares its own required + optional inputs;
                consult ``theodosia://next`` and the action's docstring
                to see what's expected. Object is the canonical
                form. A JSON-encoded string is also accepted (some
                clients serialize nested object arguments that way)
                and is parsed into an object before dispatch.

Actions (entry: select_mode):

  • select_mode: Start a run. Pass intent for natural-language mode, or just repo_path/ref for diff mode. repo_path is also where openapi.json is read from; splunk_index is the index holding the target's server-side telemetry.

  • read_diff: Read git diff <ref>..HEAD from the repo.

  • extract_endpoints: Pull changed routes from the diff and load the sibling openapi.json.

  • parse_intent: Score OpenAPI operations against the natural-language intent and pick the top matches.

  • doc_lookup: Consult the k6 MCP documentation for the constructs kassi emits (HTTP requests, thresholds, checks, scenarios) and record version-grounded citations. Non-blocking: degrades to no references when the docs are unavailable.

  • scaffold: Compose a deterministic, self-contained k6 scaffold from the OpenAPI spec (no model): per-endpoint requests with sample bodies, the baked base URL, and load options. This is the runnable baseline the next step builds on.

  • generate_script: Author the final k6 script on top of the scaffold, using k6's own generate_script MCP prompt and best-practices to guide the model. Falls back to the scaffold when the model or guidance is unavailable; validation failures are repaired by the fix_script phase.

  • validate_script: Validate the script via the k6 MCP validate_script tool (1 VU, 1 iteration).

  • fix_script: Repair the k6 script using the error the k6 MCP validate_script tool returned (real stderr + issues + suggestions), then loop back to validation. The correction loop is an explicit edge in the state machine; on a model failure it falls back to the scaffold.

  • run_test: Execute the load test via the k6 MCP run_script tool (passing VUs + duration, which the tool needs since it ignores the script's own options) and parse the metrics from the summary. Bounded by a timeout: if the authored script wedges k6 so the call never returns, fall back to running the deterministic scaffold once, so the pipeline never hangs.

  • splunk_preflight: Before correlating, verify the target Splunk index exists and capture its event count, sourcetypes, and the Splunk version via the Splunk MCP splunk_get_info / splunk_get_index_info / splunk_get_metadata tools. Non-blocking: correlate still runs if a probe fails.

  • correlate: Read the target's server-side telemetry over the exact test window via the Splunk MCP splunk_run_query tool: an overview rollup, a per-second timeline (when it degraded), a by-endpoint breakdown (which route degraded), and the dominant server-side error (why). Synthesize the actionable findings. Pass splunk_spl to override the rollup query.

  • detect_anomalies: Run Splunk's own ML over the test window via the Splunk MCP splunk_run_query tool: the AI Toolkit's StateSpaceForecast projects the latency band (falling back to the core predict command when the toolkit is unavailable), and anomalydetection flags statistically outlying buckets. This is the saturation onset found statistically, independent of the fixed error thresholds. Non-blocking: degrades to no anomalies when Splunk is unavailable.

  • analyze: The writer phase (Granite 4.1): turn the correlated facts into a cited analysis (cause,

  • screen: The auditor phase (Granite Guardian): an independent model judges whether the analysis is

  • report: Assemble the final report from the analyzed and screened state and have the model narrate

Transitions:

  • select_mode -> read_diff (when: stage == 'selected' and mode == 'diff')

  • select_mode -> parse_intent (when: stage == 'selected' and mode == 'intent')

  • read_diff -> analyze (when: stage == 'failed')

  • read_diff -> extract_endpoints (when: stage == 'diffed')

  • extract_endpoints -> doc_lookup (when: stage == 'scoped')

  • parse_intent -> analyze (when: stage == 'failed')

  • parse_intent -> doc_lookup (when: stage == 'scoped')

  • doc_lookup -> scaffold (when: stage == 'documented')

  • scaffold -> analyze (when: stage == 'failed')

  • scaffold -> generate_script (when: stage == 'scaffolded')

  • generate_script -> validate_script (when: stage == 'generated')

  • validate_script -> fix_script (when: stage == 'needs_fix')

  • fix_script -> validate_script (when: stage == 'generated')

  • validate_script -> run_test (when: stage == 'validated')

  • validate_script -> analyze (when: stage == 'failed_validation')

  • run_test -> splunk_preflight (when: stage == 'ran' and splunk_enabled)

  • run_test -> analyze (when: stage == 'ran' and not splunk_enabled)

  • run_test -> analyze (when: stage == 'failed')

  • splunk_preflight -> correlate (when: stage == 'preflighted')

  • correlate -> detect_anomalies (when: stage == 'correlated')

  • detect_anomalies -> analyze (when: stage == 'detected')

  • analyze -> screen (when: stage == 'analyzed')

  • screen -> report (when: stage == 'screened')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesName of the action to run. Must be one of the listed values; calling an out-of-state value returns an invalid_transition error with the current valid set.
inputsNoKeyword inputs to the action. Each action declares its own required + optional inputs; consult ``theodosia://next`` and the action's docstring to see what's expected. Object is the canonical form. A JSON-encoded string is also accepted (some clients serialize nested object arguments that way) and is parsed into an object before dispatch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoRefusal discriminator. When set, the response carries the matching refusal payload's fields.
stateNoPublic Application state after the step.
actionNoName of the action that ran.
app_idNoApplication uid.
chunksNoStreamed chunk count (when streamed is true).
reasonNoValidation failure reason (validation_failed only).
resultNoAction's structured return value.
detailsNoValidation failure details (validation_failed only).
messageNoHuman-readable message (unknown_action, invalid_transition, action_timeout).
streamedNoTrue when the action was a streaming action.
next_hintNoDirectional steering string appended after every step and refusal: cites what just happened and the reachable actions now. Present on success and on every refusal.
requestedNoName the client passed; present on every refusal.
error_typeNoException class name of the underlying error (action_error only).
error_messageNoStringified exception (action_error only).
known_actionsNoAll action names in the FSM (unknown_action only).
timeout_secondsNoConfigured timeout (action_timeout only).
tracker_projectNoLocalTrackingClient project name if attached.
valid_next_actionsNoActions reachable from the current state. Present on success and on every refusal so the agent can self-correct.
next_external_toolsNoPresent only when the server was mounted with external_tools. Maps each currently-reachable action to the tools (on other connected MCP servers) relevant before taking it. Call those tools, then step() to record findings and advance.
Behavior4/5

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

The destructiveHint annotation already signals this tool mutates state. The description adds substantial behavioral context beyond annotations: it documents error behavior (invalid_transition with valid action list), details non-blocking actions that degrade gracefully (doc_lookup, splunk_preflight, detect_anomalies), describes fallback behaviors (generate_script, fix_script, run_test with timeout), and reveals the read_diff -> analyze failure path. It does not explicitly state that advancing the FSM mutates/destroys prior state, but given the annotation covers destructiveness, the additional context about degradation and fallbacks earns a 4.

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?

The description is extremely information-dense and front-loads the core mechanism clearly, but it is very long, containing an exhaustive action catalog and 25-transition state table that could arguably live in a linked resource rather than the description. Every sentence carries useful information, so it earns credit for density, but the sheer size makes it hard to scan quickly for the JSON-invoking agent.

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

Completeness4/5

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

For a complex 16-action state machine with 2 parameters, an output schema, and 100% schema coverage, the description is remarkably complete. It details each action's purpose, prerequisites, fallback behaviors, and the full transition graph. An output schema exists to explain return values. The only minor gap is that some action entries are truncated mid-sentence ('analyze: The writer phase' / 'screen: The auditor phase' cuts off), suggesting incomplete authoring of the final three entries.

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%, so the baseline is 3. The description adds meaning beyond the schema by detailing action-specific input expectations ('Pass intent for natural-language mode, or just repo_path/ref for diff mode', 'Pass VUs + duration'), clarifying the inputs format (object canonical vs JSON-encoded string accepted), and explaining how invalid action values are handled. This enriches several parameters meaningfully beyond the bare schema definitions.

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?

The description clearly states the tool advances an FSM by one transition, taking an action name to execute. It provides an extensive, well-structured catalog of all 16 actions with specific descriptions of what each does, distinguishing this tool as a state-machine driver rather than a simple operation. The verb+resource framing is specific and unambiguous.

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?

The description explicitly lists all valid actions with detailed when-to-use guidance for each (e.g., 'Start a run. Pass intent for natural-language mode...'), documents when transitions are allowed via the full transition table, and explains the failure mode ('returns invalid_transition error with the list of actions actually allowed right now'). It also explicitly tells users to consult theodosia://next for expected inputs, providing clear usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vision-Stack20/Kassi-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server