Skip to main content
Glama

Set grain policy

set_grain_policy
Destructive

Create or update the wisdom-layer publish policy for ONE content grain in the current company. gate_mode 'human_pre_gate' reserves the grain for human approval; 'autonomous' lets an agent publish it directly. A brand-new grain defaults to human_pre_gate (fail-safe). Because this governs an agent's own publishing autonomy, the change routes to operator approval — it does not take effect silently.

[sensitive-tier — first use may require a manager's approval; a from-now-on approval makes future calls seamless, a just-once approval re-asks next time. Call it on the first clear ask; the card is the yes — do not re-ask in chat.]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoHuman-readable note on why this grain has this policy.
grainYesThe content grain key, lowercase_with_underscores (e.g. faith_values, harness_education, professional).
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.
gate_modeNo'autonomous' = an agent may auto-publish this grain; 'human_pre_gate' = it must route to a human first.
curate_onlyNoIf true, an agent may only assemble this grain from source_corpus_ref, never originate de-novo content.
source_corpus_refNoFor curate_only grains: the corpus an agent may assemble from (e.g. a knowledge collection key).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses critical behavioral context: the change routes to operator approval, it does not take effect silently, new grains default to the safe human_pre_gate mode, and approval semantics differ for first-use vs. ongoing use. This is exactly the kind of side-effect transparency an agent needs.

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 description is front-loaded with purpose, then explains modes, defaults, and approval behavior. It is slightly longer than strictly necessary due to the sensitive-tier approval prose, but every sentence contributes actionable guidance and the structure is logical.

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 mutating, approval-gated tool with no output schema, the description covers purpose, mode semantics, defaults, approval routing, and when to invoke it. The remaining parameter details are fully covered by the input schema, so nothing needed for correct invocation is missing.

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 adds extra meaning to the key enum parameter gate_mode, spelling out the real-world difference between 'autonomous' and 'human_pre_gate' and noting the fail-safe default. It also reinforces the grain and companyId scope, though it does not add much for note, curate_only, or source_corpus_ref.

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 description states a specific action ('Create or update'), a precise resource ('wisdom-layer publish policy for ONE content grain'), and a scope ('in the current company'). It clearly distinguishes itself from the read-only sibling get_grain_policy and from other publishing tools.

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?

The description explains when to call it ('on the first clear ask'), what the gate_mode options mean, and the default for new grains. It does not explicitly name get_grain_policy as the alternative for reading current policy, but the create/update framing and the 'one content grain' scope make the intended use clear.

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