Skip to main content
Glama

check_legal_risks

Read-onlyIdempotent

Check a planned or new feature for legal risks. Call this whenever the user plans or builds a feature for a product used in Sri Lanka, or made by a Sri Lankan company or person, even if they didn't ask about law. If the user hasn't said where the users or company are, ask them first; never guess the country. Send country codes and facts from get_fact_questions only (no idea text, no code). Returns warnings with severity (Must / Should / Check with a lawyer), the law and section, what to do, and the areas NOT covered.

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": {
      "users_in": "<users_in>",
      "facts": "<facts>"
    },
    "name": "check_legal_risks"
  }
}

Input Schema

NameRequiredDescriptionDefault
doneNorule_id values of warnings the user says are already handled. Only when the user says so; they are listed as 'done', not verified.
factsYesList of the facts that are true, from get_fact_questions
users_inYesISO country codes where users are, as the user said, e.g. ['LK']
company_inNoISO country code where the company (or maker) is, e.g. 'LK'
processing_inNoISO country codes where data is stored or processed

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and closed-world, so safety is covered; the description adds the severity taxonomy (Must / Should / Check with a lawyer), cites the law and section in results, and discloses what is NOT covered. It also constrains input payload ('no idea text, no code'), which is behavioral rather than purely structural. Some of the return-shape detail overlaps the output schema, keeping this short of a 5.

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?

Four short sentences, front-loaded with the purpose, then the trigger, then the prerequisite, then the input/output contract. No sentence is filler; each carries a distinct operational rule.

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 5-parameter tool with full schema coverage, an output schema, and clear annotations, the description supplies the remaining essentials: trigger conditions, the pre-call question about jurisdiction, input provenance rules, and the severity framing of results. An agent can decide and call correctly from this text alone.

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 100%, so the baseline is 3; the description goes beyond it by requiring ISO country codes sourced from the user's stated location and by restricting the facts parameter to values from get_fact_questions only. That adds real meaning about what belongs in each field, though it does not map its guidance to individual named parameters like company_in or processing_in.

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 opening sentence gives a specific verb and resource: checking a planned or new feature for legal risks. It then scopes the domain (Sri Lanka users or company) and names get_fact_questions as the upstream source of its inputs, which separates it from the sibling lookup tools without needing their schemas.

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?

Explicit trigger conditions are given ('whenever the user plans or builds a feature... even if they didn't ask about law') along with a prerequisite: ask for user/company location before calling rather than guessing. The negative instruction 'never guess the country' is exactly the kind of guardrail an agent needs for correct invocation.

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.