Cellv0.2.5
Agent System

Tool Definitions

Schema-only tool definitions for agent function calling

Cell exports Claude tool_use-compatible tool schemas for common insurance agent operations. These are schema-only — Cell provides the definitions, and consumers implement the execution logic.

Available tools

Document Lookup

Search and retrieve insurance documents by ID, policy number, carrier, or free-text query.

import { DOCUMENT_LOOKUP_TOOL } from "@claritylabs-inc/cell";

Input schema:

ParameterTypeRequiredDescription
idstringNoExact document ID
querystringNoFree-text search query
documentType"policy" | "quote"NoFilter by document type

COI Generation

Request generation of a Certificate of Insurance for a specific policy.

import { COI_GENERATION_TOOL } from "@claritylabs-inc/cell";

Input schema:

ParameterTypeRequiredDescription
policyIdstringYesPolicy ID to generate COI for
holderNamestringYesCertificate holder name
holderAddressstringNoCertificate holder address
additionalInsuredbooleanNoAdd holder as additional insured

Coverage Comparison

Compare coverages across two or more insurance documents.

import { COVERAGE_COMPARISON_TOOL } from "@claritylabs-inc/cell";

Input schema:

ParameterTypeRequiredDescription
documentIdsstring[]YesDocument IDs to compare
coverageTypesstring[]NoFilter to specific coverage types

Using all tools

Import all tools as an array:

import { AGENT_TOOLS } from "@claritylabs-inc/cell";

// AGENT_TOOLS = [DOCUMENT_LOOKUP_TOOL, COI_GENERATION_TOOL, COVERAGE_COMPARISON_TOOL]

Integration example

import { AGENT_TOOLS, buildAgentSystemPrompt } from "@claritylabs-inc/cell";
import { generateText } from "ai";

const systemPrompt = buildAgentSystemPrompt(ctx);

const { text, toolCalls } = await generateText({
  model: yourModel,
  system: systemPrompt,
  tools: Object.fromEntries(
    AGENT_TOOLS.map(tool => [tool.name, {
      description: tool.description,
      parameters: tool.input_schema,
    }])
  ),
  messages: conversationHistory,
});

// Handle tool calls with your own implementations
for (const call of toolCalls) {
  switch (call.toolName) {
    case "document_lookup":
      // Query your database
      break;
    case "coi_generation":
      // Generate COI PDF
      break;
    case "coverage_comparison":
      // Build comparison table
      break;
  }
}

ToolDefinition type

import type { ToolDefinition } from "@claritylabs-inc/cell";

interface ToolDefinition {
  name: string;
  description: string;
  input_schema: {
    type: "object";
    properties: Record<string, unknown>;
    required?: string[];
  };
}

On this page