Skip to main content
Glama

Get a device shadow

get_device_shadow
Read-onlyIdempotent

Read a device shadow to check staleness of reported fields and find desired fields the device has not converged on; returns the raw document in an untrusted-data fence.

Instructions

Reads the classic or a named device shadow and returns three things: how stale each reported field is, which desired fields the device has not converged on, and the raw document inside an untrusted-data fence. Prefer this over reading the raw shadow yourself — the staleness and drift analysis is where the operational answer usually is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thing_nameYesExact AWS IoT thing name.
include_rawNoInclude the full raw shadow document. Default true.
shadow_nameNoNamed shadow. Omit for the classic (unnamed) shadow.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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, openWorld). The description adds genuinely new behavioral context: it returns staleness metrics, unconverged desired fields, and fences the raw document as untrusted data. That untrusted-data fencing is a security-relevant behavior not visible in annotations or schema.

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?

Two sentences, front-loaded with the action and return shape, followed by the preference rationale. No filler.

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 3-param read-only tool with 100% schema coverage and annotations carrying the safety profile, the description is nearly complete. It covers return semantics, the untrusted-data fence, and the preference over raw reads. No output schema exists, so return-value explanation is appropriately placed in the description.

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 coverage is 100%, so all three parameters (thing_name, include_raw, shadow_name) are already fully documented in the schema. The description mentions 'classic or a named device shadow' which maps to shadow_name, but adds no syntax or default details beyond the schema. Baseline 3 applies.

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 (Reads) and resource (classic or named device shadow), and enumerates exactly what is returned: staleness, unconverged desired fields, raw document. Distinguished from sibling compare_device_shadows and list_named_shadows by being the single-thing read with analysis.

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?

Explicitly says 'Prefer this over reading the raw shadow yourself' and gives the reason (staleness and drift analysis is where the operational answer usually is). This is a clear when-to-use statement with an alternative named.

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