Skip to main content
Glama

toggle_csp

Enable or disable a contextual security policy to control whether it is applied. Set the desired enabled state, or omit it to invert the current state; verify is_active after concurrent calls.

Instructions

Enable or disable a contextual security policy. Inactive policies are not applied. Set enabled for the desired state; omitting it toggles the current state. Concurrent calls can race, so verify the returned is_active value.

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": {
      "csp_id": "<csp_id>"
    },
    "name": "toggle_csp"
  }
}

Input Schema

NameRequiredDescriptionDefault
csp_idYesCSP policy UUID
enabledNotrue = ativa; false = desativa. Omitir inverte o estado atual (repetir a chamada desfaz).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.4
    • changedInput schema / properties / csp_id / description
      Previous value: -"UUID da CSP"New value: +"CSP policy UUID"
    • addedInput schema / properties / enabled
      Added value: +{
      +  "description": "true = ativa; false = desativa. Omitir inverte o estado atual (repetir a chamada desfaz).",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations it discloses meaningful behavior: inactive policies are not enforced, omission inverts the current state, concurrent calls can race, and the caller should verify the returned is_active value. It also implicitly notes a return field (is_active) that would otherwise be undocumented given there is no output schema. This is consistent with idempotentHint=false.

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 action, then consequences, then the parameter rule, then the operational caveat. Nothing is redundant and no sentence could be dropped without losing information.

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?

For a two-parameter toggle with no output schema, it covers the essential behavior plus the race warning and the return field to inspect. It stops short of stating permission requirements or what happens to sessions already using the policy, which would make it fully self-sufficient.

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 coverage is 100%, so both csp_id and enabled are already described in the schema, including the toggle-by-omission semantics. The description restates the 'enabled' semantics in English but adds no new meaning such as accepted values or side effects for that parameter.

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?

The description opens with a specific verb pair and resource: 'Enable or disable a contextual security policy.' This distinguishes it from create_csp, delete_csp, update_csp and get_csp by function, though it never names an alternative explicitly.

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

Usage Guidelines4/5

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

It clearly explains the two modes of use: pass 'enabled' to force a desired state, or omit it to flip the current state. There is no explicit statement of when to prefer update_csp or another sibling over this tool, so the guidance is contextual rather than complete.

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

Deploy Server

Other Tools