AITools

inspect_artifact

Last updated on

Return a bounded description of an artifact's schema, targets, and layers

Returns a compact description of an artifact, so an agent can see what to collect without reading the full JSON. You choose the sections, and each section is capped at max_items entries.

Input

Takes a source plus:

FieldTypeRequiredDescription
sectionsstring[]NoAny of metadata, fields, parties, annexes, items, layers. Default: all.
max_itemsintegerNoMaximum entries per section, 1 to 500. Default 100.

Output

FieldTypeDescription
artifact_kindstringform, document, bundle, or checklist
namestringArtifact name
versionstringArtifact version
titlestringArtifact title
descriptionstringArtifact description
sectionsobjectOne entry per requested section (see below)
truncatedbooleantrue when any section had more than max_items entries
errorToolErrorSet when the artifact could not be loaded

The sections contain:

SectionContent
metadataname, version, title, description, code, language
fieldsObject keyed by field ID. Each entry keeps type, label, description, required, default, min, max, minLength, maxLength, enum, format, items, and nested fields.
parties, annexes, itemsArrays of { id, ...definition }
layersArrays of { id, kind, mime_type, path, title, description }

Values nested deeper than four levels are replaced with "[nested value omitted]".

Direct usage

import { executeInspectArtifact } from "@paradoc/ai-tools"

const result = await executeInspectArtifact({
  source: "registry",
  registry_url: "https://public.paradoc.dev",
  artifact_name: "pet-addendum",
  sections: ["fields", "parties"],
})

Example response

Party descriptions are left out here.

{
  "artifact_kind": "form",
  "name": "pet-addendum",
  "version": "1.0.0",
  "title": "Pet Addendum to Lease Agreement",
  "sections": {
    "fields": {
      "petName": { "type": "text", "label": "Pet name", "description": "Name of the pet", "required": true, "maxLength": 100 },
      "species": { "type": "enum", "label": "Species", "description": "Species of the pet", "required": true, "enum": [{ "value": "dog", "label": "Dog" }, { "value": "cat", "label": "Cat" }, { "value": "fish", "label": "Fish" }] },
      "weight": { "type": "number", "label": "Weight (lbs)", "description": "Weight of the pet in pounds", "required": true, "min": 0, "max": 200 },
      "isVaccinated": { "type": "boolean", "label": "Vaccinated", "description": "Whether the pet is up to date on all required vaccinations", "required": true }
    },
    "parties": [
      { "id": "tenant", "label": "Tenant", "partyType": "person", "min": 1, "max": 1, "signature": { "required": true, "witnesses": 0, "notarized": false } },
      { "id": "landlord", "label": "Landlord", "partyType": "any", "min": 1, "max": 1, "signature": { "required": true, "witnesses": 0, "notarized": false } }
    ]
  },
  "truncated": false
}

On this page