Skip to main content
Glama

nexus_compare_live_state_with_declared_state

Read-onlyIdempotent

Detect drift by comparing live Nexus repositories against a declared state, listing repositories that are missing, extra, or mismatched by name, format, or type.

Instructions

Compare live repositories with a declared state, for example one exported from Terraform or Puppet data by the user. Returns repositories missing in Nexus, repositories present only in Nexus, and repositories whose format or type differ. Only name, format and type are compared. Ask the user for the declared state before calling; to produce one from the live instance use nexus_generate_inventory_json. Covers what the configured account can see; endpoints missing for version, edition or permission reasons appear under limitations. Errors if Nexus is not configured, rejects the credentials or is unreachable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "declared_state": "<declared_state>"
    },
    "name": "nexus_compare_live_state_with_declared_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
declared_stateYesDeclared configuration as {"repositories": {"<name>": {"format": "maven2", "type": "proxy"}}}. Other keys are ignored.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • addedInput schema / properties / declared_state / description
      Added value: +"Declared configuration as {\"repositories\": {\"<name>\": {\"format\": \"maven2\", \"type\": \"proxy\"}}}. Other keys are ignored."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond readOnlyHint/idempotentHint, it discloses that coverage is limited to what the configured account can see and that endpoints omitted for version, edition or permission reasons are reported under "limitations". It also enumerates failure modes: Nexus not configured, credentials rejected, instance unreachable. Minor gap only: no note on performance or size limits for large inventories.

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?

Four sentences, front-loaded with the verb and result categories, then prerequisite, then coverage caveat, then error conditions. Dense but each clause carries distinct information; only the error enumeration feels slightly list-like rather than prioritized.

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 single-parameter tool with an output schema and full annotation coverage, the description supplies the remaining essentials: what is compared, where the input comes from, what happens when access is partial, and how it fails. Nothing an agent needs in order to call it correctly is missing.

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 still adds value by explaining where the declared state comes from (Terraform/Puppet exports, or the sibling inventory tool) and that it must be solicited from the user. It does not restate the nested shape, but the schema already carries that.

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?

States a specific verb and resource ("Compare live repositories with a declared state") and immediately quantifies the output: missing in Nexus, Nexus-only, and format/type mismatches. The scoping line "Only name, format and type are compared" tells an agent exactly what the comparison covers, distinguishing it from sibling audit/inventory tools.

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?

Gives an explicit prerequisite ("Ask the user for the declared state before calling") and names the sibling that generates the input ("to produce one from the live instance use nexus_generate_inventory_json"). This is the when-to-use-vs-alternative handoff the other dimensions ask for, with nothing left to inference.

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