Skip to main content
Glama

Stat artifacts

stat_artifacts
Read-only

Verify a collection of sandboxed artifacts by retrieving per-file size, SHA256 hash, and aggregate byte total. Ideal for batch export readback.

Instructions

Stat a SET of sandboxed artifacts: per-file size + sha256 plus an aggregate byte total.

When to use: to verify a whole produced collection (an icon set, a dist/ tree) and read its TOTAL byte budget in one call — the readback half of a batch export, without a du -cb. For a single file use stat_artifact.

Key params: paths is a non-empty list; each entry is resolved EXACTLY as stat_artifact resolves its path (workspace-relative or absolute, sandbox + symlink validated, size-capped). The first entry that escapes the sandbox or exceeds the size limit fails the whole call with a stable message — nothing partial is returned.

Return shape: ArtifactStatSet{artifacts: [{path, bytes, sha256}], total_bytes, count} where total_bytes is the sum of the per-file sizes and every path is workspace-relative (never a host path).

Example: stat_artifacts(["dist/16.png", "dist/32.png", "dist/64.png"])

Risk class: low (read-only stat; nothing is mutated, no Operation Record / snapshot).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
artifactsYes
total_bytesYes
Behavior4/5

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

Description adds detail beyond annotations: explains failure behavior (first failing entry causes whole call to fail with stable message) and risk class (read-only, no mutation). Annotations already indicate read-only, so description enriches.

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?

Well-structured: purpose statement, usage section, key params, return shape, example, risk class. Every sentence adds value; no redundancy. Front-loaded with essential info.

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?

Complete for a stat tool: covers purpose, usage, parameter, return shape (output schema exists), and risk. No gaps given the tool complexity and existing structured fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Only parameter 'paths' is thoroughly described: non-empty list, resolution logic (same as stat_artifact), sandbox/symlink validation, size-cap, and failure behavior. Schema has 0% description coverage, so description compensates fully.

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?

Description clearly states the tool stats a SET of artifacts, listing per-file size, sha256, and aggregate byte total. It distinguishes from the sibling stat_artifact tool which handles a single file.

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?

Explicit 'When to use' section guides when to use this tool (verify a whole produced collection, readback of batch export) and when not (single file -> use stat_artifact). Clear context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjjsood/inkscape-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server