AI tools

Overview

Last updated on

The ten tools in the Paradoc AI packages, with their inputs and outputs

Every Paradoc AI adapter exposes these ten tools. They come from @paradoc/ai-tools, so names, inputs, and outputs are the same in every adapter. Input and output fields are snake_case. Artifact JSON and fill data keep their own field names.

ToolCategoryDescription
get_registryRegistryDiscover the artifacts in a registry
get_artifactRegistryRetrieve one artifact and its instructions from a registry
inspect_artifactArtifactsReturn a bounded description of an artifact
validate_artifactArtifactsValidate an artifact definition
validate_inputFillingValidate and normalize one value before it goes into a draft
fillFillingStart a form or checklist draft from seed data
get_fill_stateFillingReport draft progress and the next target to fill
update_fillFillingMerge, clear, or reset values in a draft
renderRenderingRender a form, document, or checklist through one of its layers
extractExtractionRead a filled PDF form back into form data, with a report for each field

Sources

All tools except get_registry and get_artifact work on an artifact that you identify with a source. The source field selects one of three modes:

ModeFieldsResolution
source: "artifact"artifact, base_url?Artifact JSON passed inline. File-backed layers resolve against base_url.
source: "url"urlFetches the artifact JSON. File-backed layers resolve against the URL's directory.
source: "registry"registry_url?, artifact_nameFetches registry.json, checks the artifact is listed, then fetches it. Without registry_url, uses defaultRegistryUrl from the config.
{ source: "artifact", artifact: { kind: "form", name: "my-form", /* ... */ } }
{ source: "url", url: "https://example.com/forms/my-form.json" }
{ source: "registry", registry_url: "https://public.paradoc.dev", artifact_name: "pet-addendum" }

Errors

Tools return failures in the result instead of throwing. A failed call carries an error object, and tools that validate values also return an errors array of the same shape:

FieldTypeDescription
codestringMachine-readable code, such as validation_error, unsupported_artifact, or missing_registry_url
messagestringHuman-readable message
path(string | number)[]Optional path to the value that failed
retryablebooleanOptional hint that the call may succeed if retried

How the tools work together

Build an intake agent shows the tools in a conversation: find the form, check each answer, keep the draft, ask the next question, and render the result. Read a filled PDF starts the draft from a PDF.

Pass data and evaluation_context from each fill or update_fill result into the next call, so the draft and its date context stay the same across turns.

On this page