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
| Name | Required | Description | Default |
|---|---|---|---|
| artifact_json | No | Raw JSON artifact string. | |
| path | No | Path to a local JSON artifact file. |
Implementation Reference
- server.js:132-147 (handler)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 }); } } );