Insurance pricing: build, validate and test rating models, then price quotes from your AI client.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Fetch Ptally documentation by topic. Call BEFORE building or editing a config to load the rules and reference material you need. Topics: "rules" = agent rules, constraints, expression syntax, quality gates, and debugging guidance (start here); "readme" = full engine reference with step types, query language, input/output blocks, and code examples.
Documentation topic. "rules" for agent rules and constraints (start here). "readme" for full engine reference.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http ptally https://app.ptally.ai/mcp
Fetch Ptally documentation by topic. Call BEFORE building or editing a config to load the rules and reference material you need. Topics: "rules" = agent rules, constraints, expression syntax, quality gates, and debugging guidance (start here); "readme" = full engine reference with step types, query language, input/output blocks, and code examples.
| Argument | Type | Description |
|---|---|---|
| topic* | string | Documentation topic. "rules" for agent rules and constraints (start here). "readme" for full engine reference. |
{
"type": "object",
"required": [
"topic"
],
"properties": {
"topic": {
"enum": [
"rules",
"readme"
],
"type": "string",
"description": "Documentation topic. \"rules\" for agent rules and constraints (start here). \"readme\" for full engine reference."
}
}
}Diagnostic snapshot of the deployed MCP server plus a live probe of its store (sqlite or Postgres). Returns server name and version, protocol version, root, boot time, advertised tool names and count, a hash of the tool surface, and `store` — `{ ok, latency_ms, counts: { projects, quotes } }` from counting rows in the projects table (one row per version) and the quotes table, or `{ ok: false, latency_ms, error }`.
No arguments.
{
"type": "object",
"properties": {}
}Fetch a project by `project_reference` from the self-host store. Optional `version_reference` pins to a specific version of that project (a version from another project is a tool error); otherwise the latest live (published or approved) version is used, or the latest non-archived version of any status if none is live. Returns `{ project_reference, version_reference, version, name, description, status, summary, created_at, updated_at, project_url, version_url, latest_draft, clipped_collections, next_steps, model }`. The model is a summary for reading, never a file to hand back. Every `collection` step is stamped with `__context` (`total_rows`, `shown_rows`, `columns`, `shape`, `truncated`, `patchable`; an empty table gets `total_rows: 0`, `columns: []`, `patchable: true`): tables of up to 100 rows are shown whole and can be changed with patch_version; bigger ones are clipped, listed in `clipped_collections`, and can only change by the user downloading the model from `version_url`, you amending it, and the user uploading it. `latest_draft` is the newest draft version (null if none) — patches go there, so call get_project again with its version_reference before patching. Follow `next_steps` and tell the user which route applies before making changes. All other model content — input.format, steps, expressions, output — is returned verbatim so an LLM caller can understand what the project does and how to build a valid input payload. Precursor to run_quote and patch_version.
| Argument | Type | Description |
|---|---|---|
| project_reference* | string | UUID of the project to fetch. |
| version_reference | string | Optional. Specific version UUID of this project; defaults to the latest live version, or the latest non-archived version of any status if none are live. |
List every project stored on this self-host instance. Returns `{ count, projects: [{ project_reference, name, description }] }`. Descriptions are truncated to 100 characters so the response stays compact — call get_project for the full record. Archived projects are excluded.
No arguments.
{
"type": "object",
"properties": {}
}Fetch the full JSON schema for Ptally project config files. Use to check exact field requirements, allowed step types, and property constraints.
No arguments.
{
"type": "object"
}Fetch a worked-example Ptally project for a common line of business. Each example is a small, fully valid project with realistic collection tables, calculations, exclusions and refers, plus an embedded tests[] suite for reference. Use as a template — copy and adapt rather than authoring from scratch. Pass no arguments (or `list: true`) to get the catalog.
| Argument | Type | Description |
|---|---|---|
| list | boolean | When true (or when type is omitted), return the catalog of available examples with their descriptions instead of a single project. |
| type | string | Which starter example to return. |
{
"type": "object",
"properties": {
"list": {
"type": "boolean",
"description": "When true (or when type is omitted), return the catalog of available examples with their descriptions instead of a single project."
},
"type": {
"enum": [
"bop",
"commercial-auto",
"commercial-property",
"earthquake",
"equipment-breakdown",
"general-liability",
"home",
"inland-marine",
"management-liability",
"motor",
"travel",
"workers-comp"
],
"type": "string",
"description": "Which starter example to return."
}
}
}Change a DRAFT version's stored model with an RFC 6902 JSON Patch, merged on the server. Use it for targeted edits; any change to a clipped collection (__context.patchable: false) goes through download and upload instead (see next_steps in get_project). BEFORE CALLING 1. The version must be a draft: use get_project's latest_draft. If it is null, ask the user to click New Version on the project page (it copies the live model), then call get_project again. 2. Call get_project with the draft's version_reference and build every path from that response. Pass its updated_at as base_updated_at. 3. Tell the user what you will change (old → new) and get their go-ahead. PATHS (JSON Pointer) - Name steps, tests and other id'd array elements by id (else key) instead of index: /steps/<step id>/... and /tests/<test id>/... Ids survive other steps being inserted or removed in the same patch. - Model layout: /meta/..., /input/format/<input key>/... (format is an object keyed by input key), /steps/<id>/..., /output/format/<key>/..., /tests/<id>/... - Collection rows by index. Compressed collection ([[col1, col2, ...], [v1, v2, ...], ...]): index 0 is the header row, so the first data row is /collection/1, and a cell is /collection/<row>/<column index>. Uncompressed collection (array of row objects): the first row is /collection/0, and a cell is /collection/<row>/<column name>. Check __context.shape and __context.columns. - Append with "-" (/steps/-, /steps/<id>/collection/-). Insert at a numeric index; step order is execution order, so a new step goes after the steps whose outputs it reads. - Escape "~" as ~0 and "/" as ~1 inside a segment. EXAMPLES - Change a rate cell: {"op":"replace","path":"/steps/region_rates/collection/1/1","value":4.5} - Guard then change: [{"op":"test","path":"/steps/base_premium/formula","value":"<current formula>"},{"op":"replace","path":"/steps/base_premium/formula","value":"<new formula>"}] - Add a table row: {"op":"add","path":"/steps/type_factors/collection/-","value":["gravel",1.1]} - Change an input default: {"op":"replace","path":"/input/format/bike_value/def","value":2000} - Insert a step as the 5th: {"op":"add","path":"/steps/4","value":{ ...full step object... }} - Update a test's expected price: {"op":"replace","path":"/tests/t01/output/result","value":46.1} - Add a test: {"op":"add","path":"/tests/-","value":{"id":"young_rider","name":"Young rider","key":"young_rider","input":{ ...every input key... },"output":{"result":52.5,"valid":true}}}. Expectations go in output { result, valid }, even if older tests on the model keep them under result. RULES - Smallest change: replace a field, not a whole step; never the whole model (path "" is refused). - New or replaced steps follow the config constraints in the server instructions (retain: true on transforms, unique id = key, {{}} references, ...). - Don't send __context (it's stripped anyway). A clipped collection must stay exactly as stored — no edits, no removal, no replacement with the sample you saw. A patched collection may hold at most 100 rows. - All operations apply or none do. At most 200 per call. RESULT { saved, updated_at, validation, tests: { total, passed, failed, unchecked, failures: [{ test, problems }] }, version_url, next_steps }. saved: false = schema validation failed, nothing stored — fix from validation.errors and retry. A conflict error = the draft changed since you read it — call get_project again and rebuild. Tests are priced after saving and don't block it: report failures and ask whether their expected outputs should change. For every test's actual vs expected values, call run_version_tests. For another patch, use the returned updated_at. Never approves or publishes — the user does that in the UI.
Dry-run a quote against a stored project. Takes `project_reference`, an optional `version_reference` (defaults to the latest live version; there is no fallback to drafts, so pass `version_reference` to price one — it must belong to the project and not be archived, else a tool error), and an `input` payload that matches the project's input schema. Runs the pricing engine and returns the quote envelope — `output`, `result`, `valid`, `status`, `error`, the engine's `errors` log, `exec_time_ms`, `dry_run: true` and a null `quote_reference` — WITHOUT persisting a quotes row. Call get_project first to inspect `input.format` and build a valid input.
| Argument | Type | Description |
|---|---|---|
| input* | object | Flat quote input object matching the project's input.format schema. Use get_project to discover the required keys. |
| source | string | Optional engine `source` label passed through to the model. Defaults to "mcp". |
| project_reference* | string | UUID of the project to price against. |
| version_reference | string | Optional. Specific non-archived version UUID of this project; defaults to the latest live version (no fallback to drafts). |
{
"type": "object",
"required": [
"project_reference",
"input"
],
"properties": {
"input": {
"type": "object",
"description": "Flat quote input object matching the project's input.format schema. Use get_project to discover the required keys."
},
"source": {
"type": "string",
"description": "Optional engine `source` label passed through to the model. Defaults to \"mcp\"."
},
"project_reference": {
"type": "string",
"description": "UUID of the project to price against."
},
"version_reference": {
"type": "string",
"description": "Optional. Specific non-archived version UUID of this project; defaults to the latest live version (no fallback to drafts)."
}
}
}Price every test in a version's tests[] against that version's stored model and compare each with its expected output. Takes `version_reference` (any status but archived — a draft after patch_version, or a live version for a baseline). Runs against the stored model, so a patch saved a moment ago is included. A test passes when its result is within 0.005 of the expected result and its valid flag equals the expected valid. Expectations are read from output { result, valid }, or, when output has neither (tests imported from the hosted service), from result { result, valid }; `expected_from` says which. A test with neither is priced but unchecked (passed: null). Returns `{ project_reference, version_reference, version, status, updated_at, total, passed, failed, unchecked, results: [{ id, name, passed, expected: { result, valid }, expected_from, actual: { result, valid }, problems, errors }], version_url, next_steps }` — `problems` says why a test failed, `errors` is up to 5 of the engine's step errors for that run. Nothing is persisted. Use after patch_version, after adding or changing tests, or before a change to record the baseline. To change a test's expected output, patch_version on /tests/<test id>/output/result (drafts only) — output takes precedence over result.
| Argument | Type | Description |
|---|---|---|
| version_reference* | string | UUID of the version whose tests to run — e.g. get_project's latest_draft.version_reference, or the version_reference patch_version returned. |
{
"type": "object",
"required": [
"version_reference"
],
"properties": {
"version_reference": {
"type": "string",
"description": "UUID of the version whose tests to run — e.g. get_project's latest_draft.version_reference, or the version_reference patch_version returned."
}
}
}Server-side schema validation of a project config. Returns { valid: true/false, errors: [...] } with the JSON path, keyword, and message for each issue. Prefer local validation against get_schema during authoring; use this as a ground-truth check, including on an amended model before handing it back to the user as a file. Pass exactly one of inline `project` or a base64-gzipped `project_gz` (if the inline form is too large for your client); passing neither or both returns an error result.
| Argument | Type | Description |
|---|---|---|
| project | object | |
| project_gz | string | Optional. Base64-encoded gzip of the project JSON, used as an alternative to inline `project` when the caller cannot fit the full payload in a single tool argument. Mutually exclusive with `project`. Pricing JSON typically compresses 5-10x. |
{
"type": "object",
"properties": {
"project": {
"type": "object",
"required": [
"meta",
"input",
"steps",
"output"
],
"properties": {
"meta": {
"type": "object"
},
"input": {
"type": "object"
},
"steps": {
"type": "array",
"items": {
"type": "object"
}
},
"tests": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"key",
"input",
"output"
],
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"input": {
"type": "object"
},
"output": {
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"result": {
"type": "number"
}
}
}
}
}
},
"output": {
"type": "object"
}
}
},
"project_gz": {
"type": "string",
"description": "Optional. Base64-encoded gzip of the project JSON, used as an alternative to inline `project` when the caller cannot fit the full payload in a single tool argument. Mutually exclusive with `project`. Pricing JSON typically compresses 5-10x."
}
}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 4, 2026.
{
"type": "object",
"required": [
"project_reference"
],
"properties": {
"project_reference": {
"type": "string",
"description": "UUID of the project to fetch."
},
"version_reference": {
"type": "string",
"description": "Optional. Specific version UUID of this project; defaults to the latest live version, or the latest non-archived version of any status if none are live."
}
}
}| Argument | Type | Description |
|---|---|---|
| operations* | array | RFC 6902 JSON Patch operations, applied in order to the full stored model, all or nothing. At most 200. |
| base_updated_at* | string | The draft's updated_at exactly as get_project (called with this version_reference) or the previous patch returned it. A mismatch means someone changed the draft since — the patch is refused. |
| version_reference* | string | UUID of the draft version to patch: get_project's latest_draft.version_reference. Never a published or approved version. |
{
"type": "object",
"required": [
"version_reference",
"base_updated_at",
"operations"
],
"properties": {
"operations": {
"type": "array",
"items": {
"type": "object",
"required": [
"op",
"path"
],
"properties": {
"op": {
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
],
"type": "string",
"description": "test fails the whole patch unless the value at path equals value — use it to guard a change."
},
"from": {
"type": "string",
"description": "Source pointer for move and copy."
},
"path": {
"type": "string",
"description": "JSON Pointer into the model, e.g. /steps/<step id>/formula or /steps/<step id>/collection/1/1. Array elements by id (else key) or index; \"-\" appends."
},
"value": {
"description": "New value for add, replace and test: any JSON (a number, string, row array, row object or whole step)."
}
}
},
"description": "RFC 6902 JSON Patch operations, applied in order to the full stored model, all or nothing. At most 200."
},
"base_updated_at": {
"type": "string",
"description": "The draft's updated_at exactly as get_project (called with this version_reference) or the previous patch returned it. A mismatch means someone changed the draft since — the patch is refused."
},
"version_reference": {
"type": "string",
"description": "UUID of the draft version to patch: get_project's latest_draft.version_reference. Never a published or approved version."
}
}
}