Skip to main content
Glama

Get Inventory Job

cnc_get_inventory_job
Read-onlyIdempotent

Retrieve an inventory job by ID to check its state, type, timestamps, impacted objects, and error. Verify the outcome of device/credential/provider write operations.

Instructions

Get one inventory job by id: its state, type, timestamps, the objects it touched and the error text when it failed.

Read-only. Use it to check the outcome of a device/credential/provider write. For a job that may still be running prefer cnc_wait_for_inventory_job, which polls until it finishes. The lookup scans the newest few hundred jobs (newest first), so a very old job may not be found even though cnc_list_inventory_jobs can still page to it.

Returns: str: JSON of the job: {"job_id", "state", "type", "creation_time", "completion_time", "created_by", "impacted": [" []"], "impacted_objects": [{"uuid", "name", "ip"}], "error"}. A state of JOB_COMPLETED_WITH_WARNING is a success whose advisory is in "error". "Error: No inventory job with id ..." when the id matches nothing; other failures: "Error: ".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesInventory job id as returned by a write tool or cnc_list_inventory_jobs (e.g. '0f6c1a2e-...').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower, yet the description still adds real context: the scan window limitation (newest few hundred jobs, newest first, so very old jobs may not be found), the success-with-warning semantics of JOB_COMPLETED_WITH_WARNING, and the exact error-string behavior. These are behavioral traits not encoded in annotations.

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

Conciseness5/5

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

Front-loaded with the one-line purpose, then usage, then a structured returns block. Every sentence earns its place: the scan-window caveat and warning-state note are non-obvious and actionable, and nothing is redundant.

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-param read tool with an output schema and full annotations, this covers purpose, alternatives, lookup limitations, and return shape including edge cases (warning state, not-found error). Nothing an agent needs 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single job_id parameter is already documented with its source and an example, so the schema carries this burden. The description adds little parameter-level detail beyond confirming the id is the lookup key. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Get one inventory job by id') and enumerates exactly what is returned: state, type, timestamps, impacted objects, and error text. It explicitly distinguishes itself from siblings cnc_wait_for_inventory_job and cnc_list_inventory_jobs by name, so an agent can route without opening the 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?

Gives explicit when-to-use ('check the outcome of a device/credential/provider write') and a when-to-prefer-alternative rule ('For a job that may still be running prefer cnc_wait_for_inventory_job, which polls until it finishes'). It also names the fallback for old jobs (cnc_list_inventory_jobs can page to it). This is the full when/when-not/alternative set.

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