UN Charter 1945

UN Charter (1945, as amended) as an executable model with worked cases; not UN-affiliated

¿Debería usar esto?

Calidad y seguridad

A
Calidad de la descripción
98%
Integridad del esquema
87%
Calidad de los nombres
80%
Riesgo de envenenamiento
80%
Coincidencia de permisos
100%
Cumplimiento del protocolo
100%

Hallazgos (3)

  • HIGHTool poisoning patterns detected
  • LOWTool 'law_editions' description lacks action verben law_editions
  • INFOTool description contains placeholder or incomplete texten law_query

Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.

Costo de contexto

~8,828Tokens (definiciones de herramientas)
~3.1 KBTamaño de respuesta típico
Impacto significativo en la atención (6.90% del contexto de 128k)

Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.

Instalar

Instalación con un clic

Agrega esto a tu archivo `claude_desktop_config.json`:

{
  "mcpServers": {
    "charter": {
      "command": "npx",
      "args": [
        "@arxo/mcp-charter"
      ]
    }
  }
}

Paquetes ejecutables

npm@arxo/mcp-charter0.1.8stdio

Puntos de conexión remotos

https://mcp.arxo.io/mcp/charterstreamable-http

Qué puede hacer

Inventario de herramientas

Herramientas (20)

🟢 Solo lectura🟡 Escritura🔴 Eliminación⚪ Desconocido
🟢law_search(kinds, limit, package, query)

A semantic SEARCH over formalised law: a question or a notion in your own words → candidates with addresses — predicates with signatures, rules, article fragments. This is the layer of DISCOVERY, not of the answer: the result says WHAT to ask next (law_ask by signature, law_rules, law_sources) and establishes neither a fact nor a norm. The ranking is a deterministic lexical embedder (DECISION-0040), and similarity of text is not applicability of a norm. If you know the exact name, go straight to law_packages/law_ask; an empty result does NOT mean the norm does not exist.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "kinds": {
      "description": "narrow the kinds of candidate",
      "items": {
        "enum": [
          "package",
          "predicate",
          "rule",
          "norm",
          "constraint",
          "fragment"
        ]
      },
      "type": "array"
    },
    "limit": {
      "description": "how many candidates (8, at most 25)",
      "type": "integer"
    },
    "package": {
      "description": "search inside this instrument only",
      "type": "string"
    },
    "query": {
      "description": "a question or a notion in your own words",
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "candidates": {
      "items": {
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "package",
              "predicate",
              "rule",
              "norm",
              "constraint",
              "fragment"
            ]
          },
          "next": {
            "description": "a ready-made next call",
            "properties": {
              "argsTemplate": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "arguments": {
                "type": "object"
              },
              "tool": {
                "type": "string"
              }
            },
            "required": [
              "tool",
              "arguments"
            ],
            "type": "object"
          },
          "package": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "package",
          "id"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "corpusFingerprint": {
      "type": "string"
    },
    "fallback": {
      "type": "boolean"
    },
    "indexUnits": {
      "type": "integer"
    },
    "jurisdiction": {
      "type": "string"
    },
    "model": {
      "type": "object"
    },
    "query": {
      "type": "string"
    }
  },
  "required": [
    "jurisdiction",
    "query",
    "corpusFingerprint",
    "fallback",
    "candidates"
  ]
}
🟢law_passport(contentHash, limit, name, offset, sections, ...)

Passport of an exact release: purpose, interface, boundaries, checks and performance. The reports section holds the history of measurements, failures included. Entries are paged by JSON Pointer; next continues the answer.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "contentHash": {
      "pattern": "^sha256:[0-9a-f]{64}$",
      "type": "string"
    },
    "limit": {
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "offset": {
      "minimum": 0,
      "type": "integer"
    },
    "sections": {
      "items": {
        "enum": [
          "description",
          "interface",
          "semantics",
          "sources",
          "composition",
          "dependencies",
          "checks",
          "evidence",
          "reports"
        ]
      },
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "name",
    "version",
    "contentHash"
  ],
  "additionalProperties": false
}
🟢law_answer_capabilities

A machine-readable matrix of the Lens producers that are actually installed, of replay/projection checks, profiles, limits and the contract tests that confirm them. declared_only means a schema with no executable witness.

Esquema de entrada

{
  "type": "object",
  "additionalProperties": false
}
🟢law_capture_answer(producer, request)

Run a registered producer and obtain producerControl/0.2 for a later verifiable preparation of a Lens. The producer is chosen only from the shipped registry.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "producer": {
      "type": "string"
    },
    "request": {
      "type": "object"
    }
  },
  "required": [
    "producer",
    "request"
  ],
  "additionalProperties": false
}
⚪law_prepare_answer(assistant, calculations, documentVersion, language, producerRuns, ...)

At the explicit request of the user, repeat between 1 and 12 earlier law_ask or law_process_run calls (the course of a case, DECISION-0160), compare their replayControl strictly, and prepare a non-public frozen document for 24 hours. The client never supplies the machine answer: the server obtains it only by executing afresh. A divergence in any input, in the law, in a resource, in the server code, in the engine library or in the result rejects the document as a whole.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "assistant": {
      "additionalProperties": false,
      "properties": {
        "explanations": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "calculationRefs": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "text": {
                "maxLength": 12000,
                "type": "string"
              }
            },
            "required": [
              "text",
              "calculationRefs"
            ],
            "type": "object"
          },
          "maxItems": 48,
          "type": "array"
        },
        "summary": {
          "maxLength": 12000,
          "type": "string"
        }
      },
      "type": "object"
    },
    "calculations": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 80,
            "type": "string"
          },
          "label": {
            "maxLength": 300,
            "type": "string"
          },
          "replayControl": {
            "type": "object"
          },
          "request": {
            "type": "object"
          }
        },
        "required": [
          "request",
          "replayControl"
        ],
        "type": "object"
      },
      "maxItems": 12,
      "minItems": 1,
      "type": "array"
    },
    "documentVersion": {
      "description": "Version of the immutable document; 0.1 is kept for transitional compatibility, 0.2 includes all native results and the common reader.",
      "enum": [
        "law.answers.document/0.1",
        "law.answers.document/0.2"
      ]
    },
    "language": {
      "enum": [
        "ru",
        "en"
      ]
    },
    "producerRuns": {
      "description": "Runs of registered producers with control/0.2; mutually exclusive with calculations.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "control": {
            "type": "object"
          },
          "executionContext": {
            "type": "object"
          },
          "id": {
            "maxLength": 80,
            "type": "string"
          },
          "label": {
            "maxLength": 300,
            "type": "string"
          },
          "producer": {
            "type": "string"
          },
          "request": {
            "type": "object"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "producer",
          "request",
          "control"
        ],
        "type": "object"
      },
      "maxItems": 12,
      "minItems": 1,
      "type": "array"
    },
    "question": {
      "maxLength": 8000,
      "type": "string"
    }
  },
  "required": [
    "question"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "producerRuns"
        ]
      },
      "required": [
        "calculations"
      ]
    },
    {
      "not": {
        "required": [
          "calculations"
        ]
      },
      "required": [
        "producerRuns"
      ]
    }
  ]
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "calculationCount": {
      "type": "integer"
    },
    "contentHash": {
      "type": "string"
    },
    "documentHash": {
      "type": "string"
    },
    "expiresAt": {
      "type": "integer"
    },
    "preparationId": {
      "type": "string"
    },
    "previewUrl": {
      "type": "string"
    },
    "resultCount": {
      "type": "integer"
    }
  },
  "required": [
    "preparationId",
    "previewUrl",
    "expiresAt",
    "contentHash",
    "documentHash",
    "calculationCount"
  ]
}
🟡law_publish_answer(preparationId)

Publish a prepared document. Repeating it with the same preparationId idempotently returns the same URL and the same separate revocation secret.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "preparationId": {
      "type": "string"
    }
  },
  "required": [
    "preparationId"
  ],
  "additionalProperties": false
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "publicId": {
      "type": "string"
    },
    "publicUrl": {
      "type": "string"
    },
    "publishedAt": {
      "type": "integer"
    },
    "revokeSecret": {
      "type": "string"
    },
    "revoked": {
      "type": "boolean"
    }
  },
  "required": [
    "publicId",
    "publicUrl",
    "publishedAt",
    "revoked",
    "revokeSecret"
  ]
}
🔴law_revoke_answer(publicId, revokeSecret)

Revoke a published document using its separate secret. The public id alone grants no control; revocation closes the HTML page, the API and the download.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "publicId": {
      "type": "string"
    },
    "revokeSecret": {
      "type": "string"
    }
  },
  "required": [
    "publicId",
    "revokeSecret"
  ],
  "additionalProperties": false
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "publicId": {
      "type": "string"
    },
    "revoked": {
      "const": true
    }
  },
  "required": [
    "publicId",
    "revoked"
  ]
}
🟢law_packages(catalog, guide, limit, offset, package, ...)

The catalogue of formalised law: instruments, predicates with signatures, the boundaries of coverage. This is where the NAMES of predicates come from — they must never be guessed. But do NOT start from the catalogue when looking for the right instrument: the overview is large, and the title of an instrument rarely matches the words of a question ("Newton's laws of motion" contains no word "physics"). A question in your own words goes to law_search first, which returns addresses; the catalogue is for the exact signature of what you found. With no arguments — the overview: one line per instrument (key, title, legal order, counters of rules, facts, signatures, norms, constants); a whole instrument — package="kz-gpk"; a search over the signatures, labels and constants of every instrument — query="substring". All three modes are PAGED: limit and offset, with the remainder named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call). The unit of a page is named by pageUnit: the overview and query page over INSTRUMENTS (20 and 20 by default), package=… pages over the SIGNATURES of one instrument (20 by default, 300 at most) — large codes carry thousands. package=… together with catalog=… pages a separate list of the instrument: "questions" — the CATALOGUE OF QUESTIONS (DECISION-0190): which enquiries are provided for (a question in words, a form, a predicate or norms) and what the instrument does NOT answer, with the type of reason; a card is a template of an enquiry, not an answer, and not every instrument has one; "norms" — the NORMS of the instrument (modality §107 and label), "constants" — the CONSTANTS (names of declarations). "task-guides" — TASK GUIDES (DECISION-0414): the order of applying a canon to a document — what to gather, which cards to ask and how to read the answers; a guide answers nothing. catalog="task-guides" is allowed without package too — every guide of the profile; guide=… — the detail of one guide; the walkthrough — MCP Prompts under the same name. The detail of an instrument prints a preview of these lists and names the count and the ready-made call for the mode.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "catalog": {
      "description": "together with package: page the catalogue of questions, the norms, the constants or the task guides of the instrument instead of its signatures; \"task-guides\" also without package: every task guide of the profile",
      "enum": [
        "questions",
        "norms",
        "constants",
        "task-guides"
      ],
      "type": "string"
    },
    "guide": {
      "description": "together with catalog=\"task-guides\": the detail of one guide — a name <package>/<id> (as in prompts/list) or an id together with package",
      "type": "string"
    },
    "limit": {
      "description": "how many per page: instruments (overview 20, query 20), signatures of an instrument (20, at most 300) or elements of a catalog list (questions 20, norms 20, constants 100, task guides 20)",
      "maximum": 500,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "description": "from which element of the page (0); the unit is the pageUnit of the answer",
      "minimum": 0,
      "type": "integer"
    },
    "package": {
      "description": "the full signatures of this instrument",
      "type": "string"
    },
    "query": {
      "description": "a substring filter over signatures, labels and constants (case-insensitive)",
      "type": "string"
    }
  },
  "additionalProperties": false
}
🟢law_ask(after, afterTime, args, calc, cutoff, ...)

Put a question to formalised law. When the answer is "not established" it carries whyNot — the engine's why_not report §185: the candidate rules and the state of every conjunct (satisfied / not satisfied / undetermined); the missing facts are visible there and need not be guessed. BEFORE THE FIRST call obtain the predicate names through law_search (a question in your own words → addresses) or law_packages (the signatures of a known instrument) — an invented name will be rejected. If the tool returned an error or "not established", THAT IS THE ANSWER: pass it to the user and do not substitute general knowledge about the law of some other country. But "I found no suitable instrument" is NOT an answer until law_search has been asked: silence of the catalogue is a property of searching by title, not a conclusion about the corpus. kind='truth' — whether a fact is established (the answer follows §62: established / refuted / contradiction / not established); kind='collect' — enumerate the records; kind='deadline' — compute a time limit on the official calendar; kind='positions' — which DUTIES arose from the facts and what their statuses are (active / fulfilled / violated, §134–§138); kind='why_not' — the why_not report §185 on the same goal, whatever the status of the answer. The answer carries the rules applied, the warnings and the provenance with hashes; truth/collect also carry a signature block (parameter types, the closure of types, constants; DECISION-0139) for presentation. The server does not guess: where a norm is not formalised, the answer is "not established" or an error.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "after": {
      "description": "deadline: the date of the event",
      "type": "string"
    },
    "afterTime": {
      "description": "deadline: the time of filing",
      "type": "string"
    },
    "args": {
      "description": "the arguments of the predicate in the order of its signature; with kind='collect' exactly one of them is the selection variable ?name (for example ['urn:x:water', 'urn:x:mix', '?value']), the rest are values. Values follow the parameter type: an entity — 'urn:…' or a short name; Date — 'YYYY-MM-DD'; Money — '<number> <currency>' ('43250 KZT'); Quantity — '<number> <unit>' with the unit exactly as the package spells it ('25 calendar_year', '30 meter'; law_packages shows the units of the constants, units are never converted — §49); a constant of the package — its name",
      "type": "array"
    },
    "calc": {
      "description": "kind='calc': a tree {op,left,right}, op ∈ add|sub|mul|div|le|lt|ge|gt|eq|ne (the synonyms divide/multiply/plus/minus and the signs are accepted); the leaves are 5 | '3932 KZT' | '2 mrp' | {lookup: 'mrp', args: [2026]} — a statutory value from the corpus; aggregates §59 are {aggregate: 'sum', element: '?v', over: [{predicate, args with '?variables'}]} over the facts given in facts"
    },
    "cutoff": {
      "description": "deadline: the hour operations close",
      "type": "string"
    },
    "days": {
      "description": "deadline: the length of the period",
      "type": "integer"
    },
    "deadlinePolicy": {
      "description": "the §86 policy for counting time limits expressed in days: {start_count: 'same_day'|'next_day', include_end: true|false, roll: 'no_roll'|'next_working_day'|'previous_working_day'[, month_end: 'last_day_of_month' — for months and years only]}. Without it a norm carrying a time limit answers with a DEADLINE_POLICY_* warning — the policy is set by the law of procedure and the server never assumes one. The snapshot of the official calendar §85 for working days is supplied by the server itself whenever an instrument counts them.",
      "type": "object"
    },
    "evidence": {
      "description": "case documents, section 74, evidence_item nodes. One document is referenced from provenance.evidence of many facts. payload.confidence is data for the EvidencePolicy; the engine does not evaluate the number",
      "type": "array"
    },
    "evidencePolicy": {
      "description": "StableId of an evidence_policy node, section 78.2. Without it, previous calls keep their behaviour. The confidence threshold is a rule of that policy, not an argument of the call",
      "type": "string"
    },
    "facts": {
      "description": "facts of the case: [{predicate, args, negated?, package?, provenance?, judgment?}]. package resolves an ambiguous short name. provenance is {origin?, evidence?: StableId, span?: {page?, quote?, offset?}, extractor?: {name, version?, confidence?}, observedAt?, recordedAt?}. origin defaults to case_input (section 73; extraction adds no origin value): the extractor is lowered to a was_generated_by edge, the document to was_derived_from. confidence is a decimal string; the threshold is read by the package EvidencePolicy (field confidence), not by the engine. A fact with an extractor and no evidence is accepted as case_input and yields the warning FACT_WITHOUT_EVIDENCE. A call without provenance is unchanged. args use the same notation as the args of the question",
      "type": "array"
    },
    "focused": {
      "description": "kind='truth': ask as focused_truth (§181.3) — the same answer as the full truth, but the proof and the warnings cover only the cone of the question; the answer carries evaluationKind and the slice hashes (focus); the cone in focus is reduced to coneHash and the predicate count, the full cone manifest comes in evaluation.focusManifest with proof=true. A slice is not an audit document: law_prepare_answer does not accept it for publication",
      "type": "boolean"
    },
    "kind": {
      "description": "the kind of question (truth by default)",
      "enum": [
        "truth",
        "collect",
        "deadline",
        "calc",
        "positions",
        "why_not"
      ]
    },
    "legalTime": {
      "description": "the date of the law (YYYY-MM-DD)",
      "type": "string"
    },
    "package": {
      "description": "narrow the question to one package of law",
      "type": "string"
    },
    "predicate": {
      "description": "what is being asked, e.g. 'duty_amount'",
      "type": "string"
    },
    "proof": {
      "description": "return the evaluation field with the proof graph in the answer — a ready-made input for law_explain (kind truth|collect; by default a summary without the graph)",
      "type": "boolean"
    },
    "responseMode": {
      "description": "full (default) — the complete answer. compact is accepted for compatibility: this server builds no short reply and returns the same complete answer in both modes; there is no fullAnswer reference and no stored snapshot of the answer.",
      "enum": [
        "full",
        "compact"
      ]
    },
    "selectedInterpretations": {
      "description": "named readings §152; for an exactly_one group choose exactly one StableId out of law_packages/law_rules",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "supportEdges": {
      "description": "support edges, section 75, support_edge nodes: from is the document id, to is the fact literal, relation is supports or refutes. Admission is decided by the package EvidencePolicy, not by the host",
      "type": "array"
    },
    "unit": {
      "enum": [
        "calendar_day",
        "business_day"
      ]
    },
    "version": {
      "description": "the exact package version pinned by the client (open('name@version')); if it differs from the profile composition the host refuses instead of answering with another version",
      "type": "string"
    }
  },
  "additionalProperties": false
}
🟢law_screen(binding, goal, legalTime, package, sourceSchemaContentHash)

Build a necessary condition — a superset — for the preliminary selection of rows from an external source (DECISION-0120). This is NOT a legal answer and NOT SQL: the result is a typed tree and a manifest of the extensions up to TRUE. Every row that passes must then be computed in full by the engine, with a proof graph, on the same snapshot of the data. The binding is passed as a pinnable object; sourceSchemaContentHash is the actual hash of the source schema and is compared loudly with the pin. Case facts that carry provenance (origin, document, quote, extractor) are supplied to law_ask, not here. The confidence figure is read by the package EvidencePolicy, not by this tool and not by the engine.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "binding": {
      "description": "a law.screen.binding/0.1 artefact",
      "type": "object"
    },
    "goal": {
      "description": "a StableId or a unique short name of the goal",
      "type": "string"
    },
    "legalTime": {
      "description": "the date of the law YYYY-MM-DD; without it every window of every rule is taken into account",
      "type": "string"
    },
    "package": {
      "description": "the package key from law_packages",
      "type": "string"
    },
    "sourceSchemaContentHash": {
      "description": "the actual sha256 of the source schema",
      "type": "string"
    }
  },
  "required": [
    "package",
    "goal",
    "binding",
    "sourceSchemaContentHash"
  ],
  "additionalProperties": false
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "condition": {
      "type": "object"
    },
    "disclaimer": {
      "type": "string"
    },
    "manifest": {
      "type": "object"
    },
    "schemaVersion": {
      "const": "law.screen/0.1"
    }
  },
  "required": [
    "schemaVersion",
    "condition",
    "manifest",
    "disclaimer"
  ]
}
🟢law_rules(lang, limit, offset, package, predicate)

The rules of formalised law put into words: exactly how a predicate is derived (premises, source articles). Call this BEFORE supplying facts to law_ask — the rules say which facts are needed instead of leaving them to be guessed. For large instruments package=… returns a table of contents; the full text comes from predicate=…. The listing by package is paged: limit (20 by default, 500 at most) and offset; the remainder is named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call).

Esquema de entrada

{
  "type": "object",
  "properties": {
    "lang": {
      "description": "the language the rules are put into (DECISION-0032; the language of the profile by default; the rest are draft packs, with §218 label overlays)",
      "enum": [
        "ru",
        "kk",
        "en",
        "ky",
        "uz",
        "ar",
        "la",
        "zh",
        "de",
        "fr",
        "tr",
        "es",
        "fa",
        "ja"
      ]
    },
    "limit": {
      "description": "package: how many rules per page (20; the budget may lower it)",
      "maximum": 500,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "description": "package: from which rule (0)",
      "minimum": 0,
      "type": "integer"
    },
    "package": {
      "description": "every rule of the instrument",
      "type": "string"
    },
    "predicate": {
      "description": "the rules that derive this predicate",
      "type": "string"
    }
  },
  "additionalProperties": false
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "compact": {
      "type": "boolean"
    },
    "factsTemplate": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "limit": {
      "type": "integer"
    },
    "next": {
      "type": "object"
    },
    "offset": {
      "type": "integer"
    },
    "package": {
      "type": "string"
    },
    "ruleCount": {
      "type": "integer"
    },
    "rules": {
      "type": "array"
    },
    "total": {
      "type": "integer"
    },
    "truncated": {
      "type": "boolean"
    },
    "verbalizationGaps": {
      "type": "integer"
    }
  },
  "required": [
    "package",
    "rules"
  ]
}
🟢law_explain(answerResource, codeHash, evaluation, nodeId, question, ...)

Unfold the proof of a law_ask answer into a chain "rule ← premises → conclusion". The compact input: question (the original law_ask arguments, truth/collect), resultHash and codeHash from the provenance of the answer. The server repeats the computation and compares the hashes; if anything changed it refuses explicitly. Alternatively pass the evaluation from law_ask(proof=true). answerResource=fullAnswer.uri explains a stored compact snapshot without recomputing and without the client loading pages; by default only the proofRef chain. nodeId selects one node and all of its premises (up to 24 KB, otherwise an explicit refusal). proofHash refers to the whole graph; scope marks the part selected.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "answerResource": {
      "description": "the fullAnswer.uri of a stored answer taken with proof=true",
      "type": "string"
    },
    "codeHash": {
      "type": "string"
    },
    "evaluation": {
      "description": "the evaluation document from law_ask",
      "type": "object"
    },
    "nodeId": {
      "minLength": 1,
      "type": "string"
    },
    "question": {
      "description": "the original law_ask arguments",
      "type": "object"
    },
    "resultHash": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "anyOf": [
          {
            "required": [
              "question"
            ]
          },
          {
            "required": [
              "answerResource"
            ]
          }
        ]
      },
      "required": [
        "evaluation"
      ]
    },
    {
      "not": {
        "anyOf": [
          {
            "required": [
              "evaluation"
            ]
          },
          {
            "required": [
              "answerResource"
            ]
          }
        ]
      },
      "required": [
        "question",
        "resultHash",
        "codeHash"
      ]
    },
    {
      "not": {
        "anyOf": [
          {
            "required": [
              "evaluation"
            ]
          },
          {
            "required": [
              "question"
            ]
          },
          {
            "required": [
              "resultHash"
            ]
          },
          {
            "required": [
              "codeHash"
            ]
          }
        ]
      },
      "required": [
        "answerResource"
      ]
    }
  ]
}

Esquema de salida

{
  "type": "object",
  "properties": {
    "proofHash": {
      "type": "string"
    },
    "steps": {
      "type": "array"
    }
  },
  "required": [
    "steps"
  ]
}
🟢law_case_ask(args, card, case, evaluate, package, ...)

The ask operation §168.4 (DECISION-0165, DECISION-0399): run a registered case of a case package over its pinned dependencies and return the canonical evaluation document with a proof and a manifest. The question is JSON per query.schema.json (query), an evaluate string (evaluate + queryId), a saved queryId without query, or card + args. A refusal to prepare is an error with an LDC-* code, never an empty answer.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "args": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "the card parameters: name → string expression of the language",
      "type": "object"
    },
    "card": {
      "description": "the id of a card of an installed catalog DECISION-0190",
      "type": "string"
    },
    "case": {
      "description": "the name of the case declaration from [[cases]]; optional when there is only one case",
      "type": "string"
    },
    "evaluate": {
      "description": "the string `evaluate <expression>;` §267.2; requires queryId",
      "type": "string"
    },
    "package": {
      "description": "the path to the case package (the directory holding law.toml) from the root of the repository",
      "type": "string"
    },
    "query": {
      "description": "the question as JSON per query.schema.json; queryId is a URN in the namespace of the package, or a short name given in queryId",
      "type": "object"
    },
    "queryId": {
      "description": "without query/evaluate — the choice of a saved queries/*.json by short name or full URN; with evaluate — the id of the question being run",
      "type": "string"
    }
  },
  "required": [
    "package"
  ],
  "additionalProperties": false
}
🟢law_sources(contentHash, fragment, language, limit, offset, ...)

Sources: by default short excerpts (view=summary), 5 texts per page, with the address of the full text in fragments[].full. Either package or fragment is required (a StableId from law_search/law_rules). view=full returns exact parts of the text: textRange sets a range of Unicode characters, fragments[].next is the continuation with a contentHash. The hash refers to the WHOLE source, not to the excerpt or the part. textOffset/textLimit require fragment; a continuation requires contentHash. Lists are paged with offset/limit; the answer budget may shrink a page.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "contentHash": {
      "description": "the hash of the full text taken from the previous part",
      "type": "string"
    },
    "fragment": {
      "description": "the StableId of a fragment",
      "type": "string"
    },
    "language": {
      "description": "the language of the variant, as given on the source card",
      "type": "string"
    },
    "limit": {
      "description": "how many texts: summary 5, full 1 (the budget may lower it)",
      "maximum": 200,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "description": "from which fragment (0)",
      "minimum": 0,
      "type": "integer"
    },
    "package": {
      "description": "the package key — every fragment of that instrument",
      "type": "string"
    },
    "status": {
      "description": "the status of the variant, as given on the source card",
      "type": "string"
    },
    "textLimit": {
      "description": "the maximum number of Unicode characters in a part of the text (also ≤8000 bytes of UTF-8)",
      "maximum": 4096,
      "minimum": 1,
      "type": "integer"
    },
    "textOffset": {
      "minimum": 0,
      "type": "integer"
    },
    "view": {
      "default": "summary",
      "enum": [
        "summary",
        "full"
      ]
    }
  },
  "additionalProperties": false
}
🟢law_argue(args, facts, legalTime, limits, package, ...)

How robust a conclusion is: the map of the dispute under the argumentation profile §274 (DECISION-0039). The answer falls into four classes: SKEPTICALLY_ACCEPTED — the conclusion is invulnerable (it survives in the grounded extension); CREDULOUSLY_ACCEPTED — merely defensible (there is a position for it and a position against); REJECTED — it survives nowhere; NO_ARGUMENT — there are no arguments at all. It builds ALL arguments out of the facts and the rules of the instrument (chains that did not fire in ordinary inference included), the rebut/undermine/undercut attacks and the defeats by priority. Predicate names come from law_packages. On large instruments a refusal by cap is possible — narrow facts or raise limits.maxArguments.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "args": {
      "description": "the arguments of the predicate",
      "type": "array"
    },
    "facts": {
      "description": "facts of the case: [{predicate, args, negated?, provenance?}]. provenance is the same object as on law_ask: origin, document, quote, extractor. confidence is read by the package EvidencePolicy, not by the engine",
      "type": "array"
    },
    "legalTime": {
      "description": "the date of the law (YYYY-MM-DD)",
      "type": "string"
    },
    "limits": {
      "description": "the caps of the §274 profile: maxArguments (64), maxExtensions (8), maxUndecided (16)",
      "type": "object"
    },
    "package": {
      "description": "narrow the question to one package of law",
      "type": "string"
    },
    "predicate": {
      "description": "the conclusion whose robustness is being measured",
      "type": "string"
    }
  },
  "required": [
    "predicate"
  ],
  "additionalProperties": false
}
🟢law_process(package)

Which stages the procedure established by an instrument consists of, and whether it carries a structural defect (O-5, DECISION-0052). The stages, the transitions and the condition of every transition are reconstructed from the formalisation rather than retold: what leads from where to where, and under what condition. The check of the graph: unreachable stages, dead transitions, a transition that enters no stage at all. Without package — the list of instruments whose procedure is formalised. A stage with no exit is named but is NOT counted as a defect: whether it is terminal by design cannot be seen from the formalisation.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "package": {
      "description": "the instrument; without it — the list of instruments that carry procedures",
      "type": "string"
    }
  },
  "required": [],
  "additionalProperties": false
}
🟢law_process_run(instance, legalTime, package, probeTime, procedure, ...)

How a particular case will run, step by step (O-5, DECISION-0052): a log of {date, attempt?, facts?} is executed frame by frame, and the law of each frame is the law of ITS date. The answer says: which stages have been entered; which attempted transition produced NO legal effect (§164 — "the act was performed but did not take place"); which duties are violated and which time limits are running; what is available next and WHAT EXACTLY is missing for the rest. The names of transitions come from law_process. Stages entered means "was it ever entered", not "where it is now": the core 0.1 does not compute points of the current state.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "instance": {
      "description": "what is going through the procedure: the number of the lot, of the application, of the case",
      "type": "string"
    },
    "legalTime": {
      "description": "the base date (YYYY-MM-DD); the date of a frame is set by the step itself",
      "type": "string"
    },
    "package": {
      "description": "the instrument",
      "type": "string"
    },
    "probeTime": {
      "description": "the instant of a hypothetical attempt, used to work out the steps available on the last frame; without it the available steps are not computed — the tool does not invent time",
      "type": "string"
    },
    "procedure": {
      "description": "the procedure, where there is more than one",
      "type": "string"
    },
    "steps": {
      "description": "the log of the case: [{date, attempt?, time?, decisionTime?, knowledgeTime?, facts: [{predicate, args}]}]; on an attempted transition `time` is the instant of the event (ISO 8601 with an offset), and by it the bearer takes its place in the history §161.1 (DECISION-0156); the decision and knowledge axes of a frame come from the entry, else from the case, else from midnight UTC of the date; every frame names the axes it used and where they came from",
      "type": "array"
    }
  },
  "required": [
    "package",
    "instance",
    "steps"
  ],
  "additionalProperties": false
}
🟢law_editions(dateA, dateB, package)

The axis of editions (O-2): what changed in an instrument between two dates of the law — the state of the editions, the dating of the norms and the semantic diff §215 between the D1 projections. The verdict NOT_DATED means "there was nothing to date it by", not "nothing changed". The outcome of a particular question on a date comes from law_ask with legalTime.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "dateA": {
      "description": "the date of the law \"before\" (YYYY-MM-DD)",
      "type": "string"
    },
    "dateB": {
      "description": "the date of the law \"after\" (YYYY-MM-DD)",
      "type": "string"
    },
    "package": {
      "description": "the instrument of the corpus",
      "type": "string"
    }
  },
  "required": [
    "package",
    "dateA",
    "dateB"
  ],
  "additionalProperties": false
}
🟢law_query(arguments, case, corpus, engine, full, ...)

A deterministic LawQL query over the CLIR of a formalization: a question about the model of the act itself, not about a case. Relations: nodes(id,kind,package,package_name,path), edges(from,to,role), anchors(node,anchor,act,locator,path), labels(node,lang,text,status), fields(node,field,value,value_kind), rules(id,strength,head_predicate,head_polarity,head_variables,body_variables,body_predicates), norms(id,modality,goal_kind,condition_predicates), positions(norm,kind,bearer_type), windows(norm,kind,deadline), imports(package,imported,semantic_hash), links(from,to,kind: imports|alias|subtype|produces|reads|anchored), literals(node,context,predicate,polarity), variables(node,context,name,type), interpretations(id,predicate,role). Functions: anchor, labels, short, contains, overlaps, starts_with, ends_with, position, derivation; exists/not exists over a bound variable; equality and membership only, no arithmetic and no ordering comparisons. Scope: corpus by package.name (for example kz.corpus.labour_code, not a file name) or a glob; without corpus, the whole profile slice; a scope outside the profile is empty (CORPUS_EMPTY). Examples: `from r in rules where r.head_predicate == "urn:…#eligible" select r.id as producer, r.strength as strength, anchor(r.id) as anchors` — who produces; `from l in literals where l.predicate == "urn:…#eligible" select l.node as reader, l.context as context` — who reads; `query eligible over "pkg" { for x: Person; where applicant(x); select eligible(x); }` — inference by the core. This is orchestration over the CLIR and the core; no new legal semantics is implemented here. Instead of text, a question from the catalog with arguments: producers, readers, anchors-of, imports-of, links-of, type-step (predicate/node/type parameters are URNs, pkg is a package.name or a glob). A structural answer is a queryPage: resultHash of the full queryResult, snapshot (hash of the scope package list), rowCount, rows by rowLimit (20, at most 5000) and rowOffset, next with the snapshot for continuation; full: true returns the full queryResult when the scope is one package. Every row carries provenance (CLIR nodes); an empty answer carries the explain funnel (emptyAt names the clause); errors carry LDC-Qxxxx codes with hints; a source product too wide is refused before execution (QUERY_TOO_BROAD), a continuation on another snapshot as SNAPSHOT_CHANGED.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "arguments": {
      "description": "the question parameters: an object of name → string (predicate, node, type — URNs; pkg — a package.name or a glob)",
      "type": "object"
    },
    "case": {
      "description": "the case for query-over; it replaces the case clause",
      "type": "object"
    },
    "corpus": {
      "description": "the snapshot scope: a package.name (for example kz.corpus.labour_code) or a glob over package.name; without corpus, the whole profile slice",
      "type": "string"
    },
    "engine": {
      "default": "lawc",
      "description": "there is one engine — the core; the reference implementation is called by its own command",
      "enum": [
        "lawc"
      ]
    },
    "full": {
      "description": "return the full queryResult instead of a page; only when the scope is one package",
      "type": "boolean"
    },
    "limit": {
      "description": "an explicit cap on eval() materialisations (it does NOT bound the rows — see rowLimit)",
      "minimum": 1,
      "type": "integer"
    },
    "query": {
      "description": "inline LawQL",
      "type": "string"
    },
    "question": {
      "description": "the name of a question from the corpus/ql/questions catalog (producers, readers, anchors-of, imports-of, links-of, type-step) or of a lint; instead of query",
      "type": "string"
    },
    "rowLimit": {
      "description": "how many rows in structuredContent (20; the budget may lower it)",
      "maximum": 5000,
      "minimum": 1,
      "type": "integer"
    },
    "rowOffset": {
      "description": "from which row (0); continuation comes from next together with snapshot; structural queries only",
      "minimum": 0,
      "type": "integer"
    },
    "snapshot": {
      "description": "the snapshot hash from next.snapshot of the previous page: a continuation on another snapshot is refused (SNAPSHOT_CHANGED)",
      "type": "string"
    }
  },
  "required": [],
  "additionalProperties": false
}
🟢law_report(callId, category, expected, fragment, observed, ...)

A REPORT of a divergence between the formalisation and the source: the answer contradicts the pinned text, a norm of the source is not expressed by a rule, a §218 label diverges from the text, an address cannot be found. A report is a hypothesis for triage by a formaliser: it does NOT change the law, it never reaches the answers of the other tools, and "not derived" does not become "derived" because of it. An address is required and is checked against the catalogue: package, fragment (a StableId from law_sources) and/or predicate; callId is the X-Law-Call-Id of the answer you disagree with. The entry goes into the server log.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "callId": {
      "description": "the X-Law-Call-Id of the answer you disagree with",
      "maxLength": 128,
      "type": "string"
    },
    "category": {
      "description": "the kind of divergence: norm not expressed / outcome against the text / label against the text / address not found / text against the official one / other",
      "enum": [
        "missing-norm",
        "wrong-outcome",
        "label-mismatch",
        "broken-address",
        "source-text",
        "other"
      ]
    },
    "expected": {
      "description": "what the source says (with the article)",
      "maxLength": 2000,
      "type": "string"
    },
    "fragment": {
      "description": "the StableId of the source fragment",
      "type": "string"
    },
    "observed": {
      "description": "what the system answered",
      "maxLength": 2000,
      "type": "string"
    },
    "package": {
      "description": "the instrument of the corpus",
      "type": "string"
    },
    "predicate": {
      "description": "the predicate the report is about",
      "type": "string"
    }
  },
  "required": [
    "package",
    "category",
    "expected",
    "observed"
  ],
  "additionalProperties": false
}

Comunidad

Califica este servidor

Evidencia

Observaciones recientes

verificadoversión no registrada20 herramientas