Skip to main content
Glama

attach_artifact

Registers an assignment, code, or document artifact by computing its SHA-256 hash and storing it, enabling later verification to detect file changes.

Instructions

登记一份产物(作业文件/代码/文书):算 sha256 入库,改过就对不上。

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": {
      "session_id": "<session_id>",
      "name": "<name>",
      "path": "<path>"
    },
    "name": "attach_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
pathYes
task_idNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full load. It does disclose one real behavior (sha256 is computed and persisted, and later modification causes a mismatch), which is valuable. But it omits what happens on re-registering the same path, whether records are overwritten or duplicated, whether the file must already exist at path, and what a caller gets back.

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?

A single sentence, front-loaded with the verb and resource, then the mechanism, then the consequence. The parenthetical examples earn their place by bounding what counts as an artifact, and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and zero parameter documentation, this is a mutation-style registration tool whose description answers only 'what' and not 'with what arguments' or 'what comes back'. For a tool that writes a record keyed by session and optional task, that leaves too much for the agent to guess.

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

Parameters2/5

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

Schema coverage is 0% across four parameters, so the description must compensate and largely does not. Only 'path' is indirectly explained (it is the file being hashed); name, task_id, and session_id are never mentioned, and task_id's role in linking an artifact to a task is entirely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb (登记/register) plus the resource (一份产物, with examples 作业文件/代码/文书) and states the core mechanic: hashing with sha256 into the store. That is clearly distinguishable from a read-only sibling like list_artifacts, though the description never names a sibling to sharpen the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: you register a deliverable so its hash can later be checked, and the phrase '改过就对不上' hints at the integrity-verification purpose. There is no explicit when-to-call guidance, no mention of prerequisites (an open session), and no contrast with list_artifacts or evidence_read for retrieval workflows.

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