set_grain_policy
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'...
This record as markdown: /tools/com-getfreedomos-freedom-mcp/set-grain-policy.md
What set_grain_policy does on Freedom Mcp
AI agents use set_grain_policy to create or update resources in Freedom Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Freedom Mcp environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
note | string | — | Human-readable note on why this grain has this policy. |
grain | string | Yes | The content grain key, lowercase_with_underscores (e.g. faith_values, harness_education, professional). |
companyId | string | Yes | FreedomOS company id to act within (you must be a member). Required for company-scoped tools. |
gate_mode | string | — | 'autonomous' = an agent may auto-publish this grain; 'human_pre_gate' = it must route to a human first. |
curate_only | boolean | — | If true, an agent may only assemble this grain from source_corpus_ref, never originate de-novo content. |
source_corpus_ref | string | — | For curate_only grains: the corpus an agent may assemble from (e.g. a knowledge collection key). |
Parameters from the server's own tool schema.
Why set_grain_policy is rated Medium
This tool modifies policy settings that control agent publishing behavior. While it affects publishing autonomy, it is reversible (can be updated again), does not irreversibly delete data, does not execute arbitrary code, and does not move money. The approval requirement and 'fail-safe' default (human_pre_gate) mitigate risk.
From the tool's definition Tool 'set_grain_policy' creates or updates a publish policy that governs publishing autonomy ('gate_mode' can be set to 'human_pre_gate' or 'autonomous').
Attacks that exploit this kind of access
The rule that runs set_grain_policy safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Freedom Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For set_grain_policy, this is the rule to start with:
set_grain_policy stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Freedom Mcp, apply this rule, and every set_grain_policy call is checked against it from then on.
Questions about set_grain_policy
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.]. It is categorised as a Write tool in the Freedom Mcp MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
set_grain_policy accepts 6 parameters: note, grain, companyId, gate_mode, curate_only, source_corpus_ref. Required: grain, companyId. The full parameter table on this page comes from the server's own tool schema.
Register the Freedom MCP server in PolicyLayer and add a rule for set_grain_policy: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Freedom Mcp. Nothing to install.
set_grain_policy is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the set_grain_policy rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for set_grain_policy. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
set_grain_policy is provided by the Freedom MCP server (https://twuluxmoognlwtmaoqgo.supabase.co/functions/v1/freedom-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Freedom, and thousands of servers like it.
This server
Across the catalogue