Skip to main content
Glama

Apply a Solution Configuration

apply_solution_config
Destructive

Applies proposed layer, exclusion, and test profile rules to a C# solution, activates them, and saves the config to the database and git-tracked sidecar.

Instructions

Apply a proposed Layer Profile + Exclude-Namespaces + Test Profile configuration for a solution. Creates a new custom layer profile / exclusion list / test profile (tagged with the source solution for provenance), activates them, and marks each touched slot initialized. proposalJson is a JSON object {"layerRules":[{"pattern":".Application.","matchType":"Contains","layer":"Application"}],"exclusions":[{"pattern":"System.","matchType":"StartsWith"}]}; the test axis is given via testProposalJson {"testProjectRules":[{"pattern":".Tests","matchType":"EndsWith"}],"testAttributeNames":["Fact","Theory"]} (rules match PROJECT names) OR via testPreset = xunit|nunit|mstest|default. At least one axis must be non-empty (empty arrays/slots are skipped). matchType is Contains|StartsWith|EndsWith|Exact (an invalid matchType is rejected, not silently defaulted). An exclusion with "keep":true is a keep rule: a namespace it matches is never excluded; exclusions that are all keep rules leave the built-in list in force; the sidecar stores keep rules under "keepNamespaces". Writes to the config/master DB (the given dbPath, or the server's default - the GUI's - if omitted; created if missing) AND to the git-tracked .aicb.json sidecar next to the .sln (returned as sidecarPath - commit it so the config travels with the repo). An axis this call does not name keeps what the existing sidecar holds for it, and keys it does not know stay as they are. An existing sidecar that cannot be read (malformed, locked) is never rewritten: the call is refused before anything is written, and a file that becomes unreadable while the DB is written is left as it is too (the DB keeps the configuration, a warning says so); a keep rule the file puts inside 'exclusions' is moved to 'keepNamespaces'. A keep flag that is not a JSON boolean is rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbPathNoAbsolute path to the aicb config/master SQLite DB to write the configuration into (created if missing). Omit to use the server's default config DB (the same one the GUI uses), if the server resolved one.
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.
testPresetNoOptional shortcut: clone a built-in test profile (xunit|nunit|mstest|default) into a custom per-solution profile. Mutually exclusive with testProposalJson.
proposalJsonNoOptional layer/exclusion proposal as a JSON object with 'layerRules' and/or 'exclusions' arrays (see tool description). Omit for a test-only apply.
layeringPolicyNoLayer-mapping policy for the new profile: 'Advisory' (default) or 'Strict'.
testProfileNameNoOptional display name for the created test profile. Omit for an auto-generated name.
layerProfileNameNoOptional display name for the created layer profile. Omit for an auto-generated name.
testProposalJsonNoOptional test-axis proposal as a JSON object {"testProjectRules":[{"pattern":".Tests","matchType":"EndsWith"}],"testAttributeNames":["Fact","Theory"]}. testProjectRules match PROJECT names. Mutually exclusive with testPreset.
exclusionListNameNoOptional display name for the created exclusion list. Omit for an auto-generated name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare destructive/not-readOnly/not-idempotent; the description goes well beyond by disclosing dual writes to the DB and the git-tracked sidecar (with sidecarPath and a commit recommendation), refusal-before-write semantics for malformed or locked sidecars, a warning path when the file becomes unreadable mid-write, and keep-rule relocations between 'exclusions' and 'keepNamespaces'. It also states validation behavior (invalid matchType rejected, non-boolean keep flag rejected).

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 first sentence front-loads the action well, but the remainder is one very long unbroken paragraph mixing core behavior, JSON examples, and edge-case error handling. Some JSON example content duplicates what the schema property descriptions already show for testProposalJson, so a portion of the text does not earn its place.

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 destructive, dual-target write tool with nine parameters and no output schema, the description covers what an agent needs: what gets created and activated, where it is written, the returned sidecarPath, the commit obligation, and the failure modes that abort or partially succeed. The remaining gaps (naming parameters, layeringPolicy) are fully carried by the schema.

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 a 3 is the baseline, but the description genuinely adds meaning the schema lacks: literal JSON shapes for proposalJson and testProposalJson, the matchType value set (Contains|StartsWith|EndsWith|Exact) even though no schema enum exists, the fact that test rules match PROJECT names, and the keep/keepNamespaces semantics. Only the naming parameters (layerProfileName, exclusionListName) and layeringPolicy get no extra treatment.

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

Purpose4/5

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

States a specific verb and resource: it applies a proposed layer/exclusion/test configuration and creates plus activates the corresponding profiles and sidecar entries. The scope (DB + git-tracked <SolutionName>.aicb.json, slots marked initialized) is concrete. It never names a sibling such as init_solution_config or check_solution_config_drift to draw the boundary explicitly, so it falls short of a 5.

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

Usage Guidelines3/5

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

It gives operational rules for using the tool correctly (at least one axis must be non-empty, testPreset is mutually exclusive with testProposalJson, an axis not named retains the existing sidecar value), which implies when it is applicable. However, it never says when to prefer this over siblings like init_solution_config or solution_config_status, nor does it state prerequisites or exclusions relative to alternatives. Usage is inferable but not routed.

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