Skip to main content
Glama

ask_by_context

Ask whether an action is allowed WITHOUT choosing the law yourself (NOMOS-SPEC-014). Describe where the act happens and who it involves; NOMOS works out from its signed registrar log which laws govern it, asks every one, and combines strictly: any deny denies, a yes needs every law. Prefer this over ask_authority whenever you do not already know which law applies: naming one law leaves out the others. Each law's own answer is a permanent, signed transcript (members[].query_id). If a fact that decides which law applies is missing, the answer is INSUFFICIENT_DATA with open_facts naming it: ask the user, never guess. A place the registrar does not cover is answered INSUFFICIENT_DATA, never as permission; say so plainly. Relay coverage: the registrar lists only its own laws, so other law may also apply.

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": {
      "context": "<context>"
    },
    "name": "ask_by_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNoOptional label for what is being done (e.g. "share_customer_data_with_analytics_vendor"), recorded on each transcript.
inputsNoFacts about the action itself, evaluated by every law that applies (e.g. {"processing_fair_and_transparent": true}). A law that needs a fact you did not give holds the answer open and names it.
contextYesThe facts that decide which law applies. Codes: EU (an EU member state), QA (Qatar), AE (the UAE outside free zones with their own data law), DIFC, ADGM, QFC, US, SA, and so on.
purposeNoSet "test" for test or evaluation queries: answered and sealed, but kept out of public history and counts.
acts_forNoOptional organisation the agent acts for.
agent_idNoOptional stable name for the agent asking, recorded on each transcript.
exchange_api_keyNoExchange API key (nxk_...). Optional; needed only for licensed (paid) authorities.

Output Schema

NameRequiredDescriptionDefault
modeNo"resolution": the laws were worked out from the context, not chosen by the caller
reasonNoWhy, in words
membersNoEach law's own answer, with its permanent transcript (query_id)
verdictNoThe strict combination of every applicable law's verdict
coverageNoWhat the answer covers; relay it to the user
authorizedNoTrue only when every applicable law authorizes; never true over an empty set of laws
open_factsNoFacts to supply when the answer is held open
resolutionNoHow the laws were resolved (status, applicable, missing, proof with the log head consulted)
escalationsNoEach law that requires approval, with its escalation
answered_underNoThe laws the answer was computed under
deciding_authoritiesNoThe laws that decided the verdict

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false) it discloses the core combination semantics ("any deny denies, a yes needs every law"), that each law's answer is a permanent signed transcript, and the INSUFFICIENT_DATA / open_facts failure mode. The one meaningful gap is that it never states what the write side effect is or whether a query costs anything beyond the optional exchange_api_key note for paid authorities.

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

Conciseness4/5

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

The key distinction from the sibling and the combination rule are front-loaded, and every sentence carries operational content (combination rule, transcript IDs, INSUFFICIENT_DATA handling, coverage relay). The prose is dense and multi-clause in places, and the "NOMOS-SPEC-014" tag adds little for an agent, keeping it just short of a 5.

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

Completeness5/5

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

For a 7-parameter, open-world tool with a nested context object and an output schema, the description covers the decision rule, the insufficient-data path, the transcript identifier (members[].query_id), and the coverage caveat. Since an output schema exists, it correctly does not waste words re-specifying return shapes.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning: it frames `context` as the facts that decide which law applies and `inputs` as facts every applicable law evaluates, and it ties `inputs` to the open_facts failure mode. It does not walk through subjects_in vs. established_in vs. output_used_in, which the schema itself handles.

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

Purpose5/5

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

The first clause gives a specific verb and resource ("Ask whether an action is allowed") plus the defining constraint ("WITHOUT choosing the law yourself"), and the second sentence explains the mechanism: NOMOS derives the governing laws from its registrar log and evaluates all of them. It explicitly contrasts with the sibling ask_authority, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

It names the alternative and the exact selection condition: "Prefer this over ask_authority whenever you do not already know which law applies: naming one law leaves out the others." It also prescribes escalation behavior when data is missing ("ask the user, never guess") and how to handle uncovered places ("say so plainly"), covering when-to-use, when-to-defer, and how to relay results.

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.

Resources