Skip to main content
Glama

create_access_policy

Defines workspace access policies that allow or deny users, groups, and agents access to MCP tools or provider models, returning the policy UUID.

Instructions

Create a workspace access policy for users, groups, and agents targeting MCP tools or provider models. Changes who may access those targets. An omitted effect becomes deny only when both user ANY and agent ANY are present; otherwise allow, which requires a specific subject. Returns the policy UUID; use get_access_policy before later updates.

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": {
      "name": "<name>",
      "subjects": "<subjects>",
      "targets": "<targets>"
    },
    "name": "create_access_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesPolicy name, unique within the workspace (1-64 characters)
effectNoAllow or deny access; omitted create effect is inferred, while omitted update effect keeps its stored value
enabledNoWhether the policy is enabled; creates default to true, updates preserve the stored value when omitted
targetsYesComplete target list; updates replace the existing targets
subjectsYesComplete subject list; updates replace the existing subjects. A side without entries matches requests without that principal
descriptionNoPolicy description; null clears it
workspace_idNoWorkspace UUID or slug; required with an organisation-level API key

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv1.0.8

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare it is a non-idempotent, non-destructive write, which says little about access semantics. The description goes well beyond that by disclosing the effect-inference rule for omitted effect (deny only when both user ANY and agent ANY are present, otherwise allow requiring a specific subject), which is exactly the kind of surprising default an agent must know. It stops short of stating permission requirements or what happens on duplicate names.

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?

Four compact sentences, front-loaded with purpose and value, then the non-obvious default rule, then the return/next-step note. Dense but every clause carries information; "which requires a specific subject" is slightly compressed and takes a re-read.

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?

Return value is noted as a UUID (output schema exists, so no need to elaborate further), the ordering hint against get_access_policy is present, and the key semantic trap is covered. Gaps are minor: it doesn't flag the workspace_id/org-level-key requirement, though the schema does.

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 earns above baseline by explaining the omitted-effect inference rule that the schema only gestures at with "inferred." It does not otherwise add syntax detail for subjects/targets, which is fine since the schema is thorough.

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?

States a specific verb and resource ("Create a workspace access policy") plus the supported subject kinds and target kinds, which distinguishes it cleanly from update_access_policy and get_access_policy in the sibling set. The second sentence names the actual effect ("Changes who may access those targets") so an agent knows the blast radius without opening the schema.

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?

Gives a concrete workflow instruction: "use get_access_policy before later updates," which routes the agent correctly against the sibling read tool. It does not explicitly contrast with update_access_policy or delete_access_policy, so when-not-to-use remains implicit.

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