list_templates
Retrieve available compliance templates like SOC2 or GDPR to obtain the templateId needed for document verification.
Instructions
List compliance criteria templates available to the organization (e.g., 'SOC2 Vendor', 'GDPR DPA'). Call this before start_verification to find the right templateId. Each template encodes a checklist of criteria a document is verified against.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/list_templates.ts:6-12 (handler)The tool's handler function executes the actual logic: it calls client.get('/v1/templates') to list available compliance criteria templates.
export const listTemplates = defineTool({ name: "list_templates", description: "List compliance criteria templates available to the organization (e.g., 'SOC2 Vendor', 'GDPR DPA'). Call this before start_verification to find the right templateId. Each template encodes a checklist of criteria a document is verified against.", inputSchema: Input, handler: async (_input, { client }) => client.get("/v1/templates"), }); - src/tools/list_templates.ts:4-4 (schema)Input schema: an empty object since list_templates takes no arguments.
const Input = z.object({}).describe("No arguments."); - src/tools/index.ts:11-20 (registration)Registration: listTemplates is exported in the tools array, making it available as a tool.
export const tools: ToolDef[] = [ uploadDocument, getDocument, listDocuments, listTemplates, startVerification, getVerification, chatWithDocument, getUsage, ]; - src/tools/list_templates.ts:6-12 (helper)The defineTool helper wraps the tool definition into a typed ToolDef object.
export const listTemplates = defineTool({ name: "list_templates", description: "List compliance criteria templates available to the organization (e.g., 'SOC2 Vendor', 'GDPR DPA'). Call this before start_verification to find the right templateId. Each template encodes a checklist of criteria a document is verified against.", inputSchema: Input, handler: async (_input, { client }) => client.get("/v1/templates"), }); - src/tools/types.ts:17-24 (helper)The defineTool helper function used to create type-safe tool definitions.
export function defineTool<Input extends z.ZodTypeAny>(t: { name: string; description: string; inputSchema: Input; handler: (input: z.infer<Input>, ctx: ToolContext) => Promise<unknown>; }): ToolDef { return t as unknown as ToolDef; }