Skip to main content
Glama

explain_artifact

Analyze signed artifact structure and contents to understand format and key elements without verification keys.

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 logic for explaining an artifact.
    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,
      };
    }
  • server.js:228-243 (registration)
    The registration of the 'explain_artifact' MCP tool.
    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 });
        }
      }
    );

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