flag_work_item
Flag unresolved work for the next repair and retest, or clear a flag once its reason is resolved. Ordinary failures remain visible and claimable. A FLAG IS NOT A TAG. The tag says how urgent the work is; a flag records an unresolved problem. If a card is merely important, use set_work_item_tag. T...
This record as markdown: /tools/adrata-adrata-mcp/flag-work-item.md
What flag_work_item does on Adrata
AI agents call flag_work_item to permanently remove resources in Adrata, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
Why flag_work_item is rated Critical
An AI agent that decides to call flag_work_item doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Adrata is gone. There is no undo for destructive operations.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs flag_work_item safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Adrata, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For flag_work_item, this is the rule to start with:
flag_work_item is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Adrata, apply this rule, and every flag_work_item call is checked against it from then on.
Questions about flag_work_item
Flag unresolved work for the next repair and retest, or clear a flag once its reason is resolved. Ordinary failures remain visible and claimable. A FLAG IS NOT A TAG. The tag says how urgent the work is; a flag records an unresolved problem. If a card is merely important, use set_work_item_tag. THE REASON IS REQUIRED IN BOTH DIRECTIONS, and it is not the audit reason — it is the text read on the card. Raising says what failed, what you tried, and what remains to check; clearing says what resolved it. Agents may clear a resolved flag without a human handoff. Both directions append a comment, preserving the original failure and its resolution. A FLAG HANDS THE CARD ON; IT DOES NOT HIDE IT. A failed test or an unsuccessful first repair is not an external hold. Leave it claimable so the next agent can investigate, repair, and independently retest. Clearing a flag does not certify acceptance criteria or replace either QA gate. EVERY FLAG HAS A KIND. criterion_failure (a named criterion failed on a named build; prefer marking the criterion unmet with record_work_item_qa_failure_and_release), env_tooling (never blocks, expires after 24h — but do not flag environment or seat problems at all; record them as a comment), owner_decision (only the owner can answer; the owner is notified), external_dependency (a credential, consent or vendor). Omitted, the server infers external_dependency when blocksClaim is true and criterion_failure otherwise. A REASON IS ONE SENTENCE PLUS THE UNBLOCK STEP, 280 characters at most. Put everything else in detail, which is kept in the flag. It is categorised as a Destructive tool in the Adrata MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the Adrata MCP server in PolicyLayer and add a rule for flag_work_item: 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 Adrata. Nothing to install.
flag_work_item is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the flag_work_item 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 flag_work_item. 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.
flag_work_item is provided by the Adrata MCP server (@adrata/adrata-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Adrata, and thousands of servers like it.
Across the catalogue