Skip to main content
Glama

Search law

search_law
Read-onlyIdempotent

Search the text of all the law in force on a date, across every jurisdiction or one. Plain text by default.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoAn in-force date, YYYY-MM-DD, or "today". Defaults to today.
kindNolaws (default; "law" is read the same): law only. judgments: court decisions (case law) only. all: both. A jurisdiction that names case law (a path ending in /caselaw) reads it too.
queryYesWords or a phrase; a regular expression if regex is true.
regexNoRead query as a regular expression (POSIX extended, as git grep -E reads it) instead of plain text (default false).
offsetNoRows to skip: the next_offset the answer before gave in "page" (default 0).
max_resultsNoMatching lines to return (default 30, at most 200).
jurisdictionNoOptional jurisdiction prefix, for example "germany", "united-states/federal" or "united-kingdom/uk/legislation/uksi".
case_sensitiveNoMatch upper and lower case as written (default false: either case matches).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / case_sensitive / description
      Added value: +"Match upper and lower case as written (default false: either case matches)."
    • changedInput schema / properties / kind / description
      Previous value: -"law (default): bodies of law only. judgments: court decisions (case law) only. Case law is also read when the jurisdiction names it (a path ending in /caselaw)."New value: +"laws (default; \"law\" is read the same): law only. judgments: court decisions (case law) only. all: both. A jurisdiction that names case law (a path ending in /caselaw) reads it too."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "law",
      -  "judgments"
      -]New value: +[
      +  "laws",
      +  "judgments",
      +  "all",
      +  "law"
      +]
    • changedInput schema / properties / max_results / description
      Previous value: -"Lines to return (default 30)."New value: +"Matching lines to return (default 30, at most 200)."
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Rows to skip: the next_offset the answer before gave in \"page\" (default 0).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / regex / description
      Added value: +"Read query as a regular expression (POSIX extended, as git grep -E reads it) instead of plain text (default false)."
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context by saying results are evaluated as of an in-force date and that matching is plain text unless regex is requested, but it says nothing about result volume, pagination, or how jurisdiction scoping changes recall.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with zero padding, and the core capability and its scoping are front-loaded before the default-mode note. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, rich annotations, and fully described parameters, the description needn't explain return values or per-parameter syntax. It covers the essential mental model (point-in-time, jurisdiction-scoped, text search), though it could note that the jurisdiction prefix narrows the corpus, which materially affects results for a tool with 8 parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including date, kind, regex, offset and jurisdiction is already documented in the schema, making a baseline of 3 appropriate. The description reinforces the date ('in force on a date') and plain-text semantics but adds no format, syntax, or edge-case detail beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search the text of all the law') plus the two key scopes: temporal ('in force on a date') and jurisdictional ('across every jurisdiction or one'). It does not name or contrast with siblings such as read_law or find_provision, so an agent must infer that this is the free-text search entry point rather than a targeted retrieval tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Plain text by default' hints at the plain-vs-regex choice and the in-force date scoping implies this is for point-in-time search, but there is no explicit when-to-use or when-not-to-use statement relative to alternatives. Usage is implied rather than stated, leaving the agent to guess between this and the more targeted sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.