Skip to main content
Glama

Explore Artifact Files

artifact-explore
Read-only

Inspect the files of an EXISTING artifact: list them, search their text, read them, or review the commit history. Works with no shell, no git and no network access, so prefer it whenever you cannot run git. Pass the sessionId (the last path segment of a .../chat/ URL). A canvasDraft field, when authorized, reports an uncommitted Canvas draft. Use action draft to inspect its projection overlay explicitly; ordinary reads remain committed files. Draft access requires write permission. Typical flow to change something: action "search" to find the file, action "read" for the files you will edit, then artifact-edit. Every response includes "revision", the artifact's current commit — pass it back as artifact-edit's baseRevision. Use action "read" with a "revision" to see how a file looked at an earlier commit (this is how you undo something). Assets — images, fonts, media — are readable too: action "read" answers with size, mime and oid under "asset": true whenever a file's bytes are not text, instead of content. That check is on the bytes, so it is the authority: an SVG reads as text, and a file with an unfamiliar extension may still come back as an asset. When a search comes back empty, check "notSearched": "assets" counts binary files a text query can never match, and "excluded" counts files under node_modules, dist or build — re-run with includeExcluded true to search those. A "tree" listing also maps any path artifact-edit cannot change under "unwritable". For generation or build progress use artifact-status instead; this shows the commit log, not build state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNotree and search only: a literal directory prefix to look inside, e.g. "src" or "packages/ui". NOT a glob — no wildcards.
limitNotree, search and history: maximum rows to return (tree ≤500, search ≤500, history ≤50).
pathsNoFor read (REQUIRED) or draft (optional; omit to list changed paths): up to 10 file paths to return in one call. The whole response shares a size budget: files past it come back with deferred: true. Every file reports startLine, endLine and totalLines, plus truncated: true when what you got is not the whole file — read the rest with an explicit range. A file whose bytes are not text comes back as asset: true with its size instead of content; committed reads also include mime and oid.
queryNosearch only, REQUIRED for it: text to find. Matching never spans lines, and is case-insensitive unless you pass caseSensitive. Each match reports occurrences, the count on that line — sum them when you need the total in a file, since one line can hold several.
rangeNoread or draft, optional: line window as "startLine,endLine" (1-based, inclusive), e.g. "1,120". Valid only when paths holds exactly one file.
regexNosearch only: treat query as a JavaScript regular expression instead of literal text.
actionYesWhat to look at. tree = list file paths. search = find text inside files (start here when you do not know which file to change). read = committed file contents. history = commits, newest first. draft = inspect the saved Canvas draft overlay; requires write access. Omit paths to list changed paths, or pass paths and an optional line range to read them. Not a Git revision; unchanged files belong to baseCommitHash.
cursorNohistory only: continue the log after this point, using nextCursor from a previous response.
revisionNotree, read and search: look at the artifact as it was at this commit instead of now — this is how you recover earlier content. history: return this single commit with the files it changed. Accepts a commit id from action=history, an unambiguous abbreviation of one, or "HEAD"; not a branch name, tag or range. Commits are on main only.
sessionIdYesThe artifact session id — the last path segment of the artifact URL (e.g. "mr25vsjppVtbMx" from https://app.agentgrid.io/artifacts/mr25vsjppVtbMx), or the id from artifact-create.
caseSensitiveNosearch only: match case exactly. Use it before counting occurrences you intend to replace.
includeExcludedNotree and search: also include node_modules, dist and build, which are skipped by default. When a search comes back empty with notSearched.excluded set, the term may be in there.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"What to look at. tree = list file paths. search = find text inside files (start here when you do not know which file to change). read = return file contents. history = commits, newest first."New value: +"What to look at. tree = list file paths. search = find text inside files (start here when you do not know which file to change). read = committed file contents. history = commits, newest first. draft = inspect the saved Canvas draft overlay; requires write access. Omit paths to list changed paths, or pass paths and an optional line range to read them. Not a Git revision; unchanged files belong to baseCommitHash."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "tree",
      -  "read",
      -  "search",
      -  "history"
      -]New value: +[
      +  "tree",
      +  "read",
      +  "search",
      +  "history",
      +  "draft"
      +]
    • changedInput schema / properties / paths / description
      Previous value: -"read only, REQUIRED for it: up to 10 file paths to return in one call. The whole response shares a size budget: files past it come back with deferred: true. Every file reports startLine, endLine and totalLines, plus truncated: true when what you got is not the whole file — read the rest with an explicit range. A file whose bytes are not text comes back as asset: true with its size, mime and oid instead of content."New value: +"For read (REQUIRED) or draft (optional; omit to list changed paths): up to 10 file paths to return in one call. The whole response shares a size budget: files past it come back with deferred: true. Every file reports startLine, endLine and totalLines, plus truncated: true when what you got is not the whole file — read the rest with an explicit range. A file whose bytes are not text comes back as asset: true with its size instead of content; committed reads also include mime and oid."
    • changedInput schema / properties / range / description
      Previous value: -"read only, optional: line window as \"startLine,endLine\" (1-based, inclusive), e.g. \"1,120\". Valid only when paths holds exactly one file."New value: +"read or draft, optional: line window as \"startLine,endLine\" (1-based, inclusive), e.g. \"1,120\". Valid only when paths holds exactly one file."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Despite annotations already declaring readOnlyHint and non-destructive, the description adds substantial behavioral context: draft requires write permission, assets are detected by byte-check (SVG reads as text), empty searches explain notSearched.excluded and notSearched.assets, unwritable paths are mapped in tree, and response includes deferred files and truncated text with size budget. No contradiction with annotations; rich operational transparency.

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?

The description is dense and every sentence carries unique operational information—no filler or repetition. However, it is a single long unbroken paragraph, which makes scanning harder for an agent needing quick reference; slightly more structure (e.g., separating actions, revision, assets) would earn a 5.

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?

With 12 parameters, no output schema, and rich edge cases, the description covers return semantics (revision, asset, notSearched, unwritable, deferred, truncated, nextCursor), version undo, asset distinction, search boundary behavior, and pagination. It even addresses the empty-search diagnostic path. Nothing essential for correct tool use is missing.

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?

Schema coverage is 100%, so baseline is 3, but the description adds meaning well beyond the schema: 'path' is explicitly NOT a glob, 'search' matching never spans lines, 'range' is only valid for a single file, 'revision' is not a branch/tag/range and commits are on main only, 'paths' for read is required and up to 10 files, and each action's expected parameter usage is spelled out (e.g. 'Omit paths to list changed paths'). This materially improves correct invocation.

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?

Opens with a precise verb+resource statement: 'Inspect the files of an EXISTING artifact: list them, search their text, read them, or review the commit history.' This clearly distinguishes the inspect/read role from sibling tools like artifact-edit (modify) and artifact-status (build progress), leaving no ambiguity about what the tool does.

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 states when to prefer this tool: 'Works with no shell, no git and no network access, so prefer it whenever you cannot run git.' It also names an alternative for a different use case: 'For generation or build progress use artifact-status instead.' The description even prescribes a typical workflow (search → read → artifact-edit) and explains when to use a revision for undo, giving agent clear selection and invocation guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.