Skip to main content
Glama

Execute Composite Multi Step Codebase Workflow

execute_codebase_workflow
Destructive

Runs a combined codebase audit and context pipeline when action='auto', or routes to specific analyses like security, dependencies, impact, and search for targeted workflows.

Instructions

Compatibility router for combined reports, distinguishing from 'build_project_context' and 'audit_code_quality' by combining analyses when action='auto'; for individual tasks use the dedicated tools directly.

Parameters:

  • action: Workflow operation: 'auto' runs comprehensive all-in-one audit & context pipeline; 'context' builds AST context tree; 'audit' checks code quality & smells; 'security' runs Zero-Leak secret scan; 'blueprint' generates Mermaid architecture; 'dependencies' maps import topology; 'impact' evaluates blast radius of modified symbols; 'search' performs hybrid BM25 code search; 'prune' strips in-memory AST bodies; 'heal' runs AST self-healing; 'memory' manages episodic memory; 'swarm' coordinates multi-agent consensus.

  • target: Target repository root path, file path, git diff text buffer, or raw source code snippet to process.

  • query: Free-text search term, focus symbol name, or goal prompt depending on selected action.

  • options: Optional JSON string specifying extra configuration parameters (e.g. {"reduction_mode": "ultra", "max_tokens": 32000, "depth": 4}).

Behavior:

  • Mutability: Depends on action and options. Security may install hooks; rules, memory, sync, healing, merge, and generated tests can modify files.

  • Idempotency: Not guaranteed for state-changing operations.

  • Privacy & Network: Most analysis is local, but blueprint with use_ai can contact a configured provider and transmit context.

  • Performance & Resources: Runtime and memory depend on workspace size and selected operation.

  • Auth: Zero authentication or cloud credentials required.

  • Return Structure: Emits comprehensive executive Markdown report tailored to the requested action or full autonomous pipeline.

  • Error Handling: Gracefully reports clean diagnostic notices for missing paths, unparseable files, or invalid JSON options without crashing.

Usage Guidelines:

  • When to use: Use action='auto' for a combined report or retain this router for compatibility with existing clients.

  • When NOT to use: Do not use when an isolated single-purpose operation is sufficient, such as generating an AST context tree (use 'build_project_context' instead), auditing code smells (use 'audit_code_quality' instead), scanning secrets (use 'verify_security_guard' instead), or pruning an in-memory snippet (use 'prune_code_snippet' instead).

Returns: Comprehensive Markdown report tailored to the requested action or full autonomous pipeline.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "execute_codebase_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoSearch query, focus symbol name, or task goal prompt.
actionNoWorkflow operation: 'auto' (comprehensive all-in-one pipeline), 'context', 'audit', 'security', 'blueprint', 'dependencies', 'impact', 'search', 'prune', 'heal', 'memory', 'swarm', 'design'.auto
targetNoTarget repository path, file path, diff string, or code snippet (default: '.')..
optionsNoOptional JSON string or dictionary of additional configuration parameters.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv10.7.4
    • addedInput schema / properties / options / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / options / description
      Previous value: -"Optional JSON string of additional configuration parameters."New value: +"Optional JSON string or dictionary of additional configuration parameters."
    • removedInput schema / properties / options / type
      Removed value: -"string"
  2. Addedv7.3.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, openWorldHint=true, and idempotentHint=false, but the description adds real specifics beyond them: which actions can modify files or install hooks, that blueprint with use_ai transmits context to a provider, that no auth is required, and that invalid JSON/paths degrade to diagnostics. It is hedged ('Depends on action and options') and names actions like 'sync', 'merge', and 'rules' that are not in the action enum, which blurs the mutability map.

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

Conciseness4/5

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

Despite its length, the definition is sectioned into Parameters, Behavior, Usage Guidelines, and Returns, with the discriminating scoping information front-loaded. The only waste is the duplicated return-value text under 'Return Structure' and again in the trailing 'Returns:' line.

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 multi-mode router with an output schema and full parameter coverage, the definition supplies action-by-action meaning, mutability and network caveats, auth expectations, and error behavior. The one omission, the undocumented 'design' action, is minor against the surrounding completeness.

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 earns more by spelling out what each action value means (the schema enum only lists bare names) and by giving a concrete options example with reduction_mode, max_tokens, and depth. The gap is that the schema enum includes 'design' while the description's action list omits it.

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 opens with a concrete framing ('Compatibility router for combined reports') and immediately distinguishes itself from build_project_context and audit_code_quality, then enumerates the twelve-plus actions it can run. An agent can tell exactly what this tool does and how it differs from the single-purpose siblings 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?

It gives explicit when-to-use ('action=auto for a combined report or retain this router for compatibility') and a dedicated when-NOT-to-use block that routes four named alternatives to build_project_context, audit_code_quality, verify_security_guard, and prune_code_snippet. This is the strongest form of router guidance.

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