Skip to main content
Glama

explain_artifact

Parse and display the format and top-level contents of a signed artifact from a JSON string or file, without needing a verification key.

Instructions

Explain the format and top-level contents of a signed artifact without requiring a verification key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artifact_jsonNoRaw JSON artifact string.
pathNoPath to a local JSON artifact file.

Implementation Reference

  • The core handler function `explainArtifact` that extracts and returns the type, format, issuer, kid, issued_at, and payload_keys from an artifact without requiring a verification key.
    function explainArtifact(artifact) {
      const core = getArtifactCore(artifact);
      const payload = artifact?.payload || core.artifact?.payload || core.artifact;
      const payloadKeys = payload && typeof payload === 'object'
        ? Object.keys(payload).filter((k) => k !== 'signature').sort()
        : [];
    
      return {
        type: artifact?.type || core.artifact?.type || 'unknown',
        format: core.format,
        issuer: artifact?.issuer || null,
        kid: core.kid,
        issued_at: artifact?.issued_at || artifact?.timestamp || payload?.issued_at || null,
        payload_keys: payloadKeys,
      };
    }
  • Zod schema definitions for the explain_artifact tool: artifact_json (optional string) and path (optional string), both described for raw JSON or file path input.
    {
      artifact_json: z.string().optional().describe('Raw JSON artifact string.'),
      path: z.string().optional().describe('Path to a local JSON artifact file.'),
    },
  • server.js:228-243 (registration)
    Registration of the 'explain_artifact' tool on the McpServer using server.tool(), with a description and async handler that reads input and calls explainArtifact().
    server.tool(
      'explain_artifact',
      'Explain the format and top-level contents of a signed artifact without requiring a verification key.',
      {
        artifact_json: z.string().optional().describe('Raw JSON artifact string.'),
        path: z.string().optional().describe('Path to a local JSON artifact file.'),
      },
      async (args) => {
        try {
          const artifact = readJsonInput(args.path, args.artifact_json);
          return textResult(explainArtifact(artifact));
        } catch (error) {
          return textResult({ ok: false, error: error.message });
        }
      }
    );
Behavior4/5

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

No annotations are provided, so the description carries full responsibility. It discloses that the tool explains format and contents and does not require a key. This is transparent about its non-destructive, read-only nature, though it does not detail safety or side effects.

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?

The description is a single sentence that is concise and front-loaded with the action ('Explain') and the object ('format and top-level contents'). Every word earns its place, and there is no redundancy.

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?

Given the simplicity of the tool (2 parameters, no required inputs, no output schema), the description covers the main purpose and key differentiator. However, it does not hint at the output format or what 'explain' entails, leaving some gap for a complete understanding.

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?

The input schema has 100% coverage, with descriptions for both parameters. The tool description does not add extra semantics beyond the schema, resulting in a baseline score of 3. No additional meaning is provided for choosing between 'artifact_json' and 'path'.

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?

The description clearly states the tool explains the format and top-level contents of a signed artifact without requiring a verification key. It uses specific verbs and resources, distinguishing it from sibling tools that likely perform verification.

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?

The description implies usage for inspection without verification, but it does not explicitly provide when-to-use or when-not-to-use guidance or mention alternatives. The phrase 'without requiring a verification key' suggests a context but lacks direct comparison.

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/ScopeBlind/verify-mcp'

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