AI agents use process_turn to create or update resources in Mentedb — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mentedb environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
turn_id | integer | Yes | Conversation turn number (monotonically increasing). Used for trajectory tracking. |
agent_id | string | null | — | Optional agent UUID. Defaults to nil UUID if not provided. |
session_id | string | null | — | Originating session ID. Stored turns are tagged with it so injection recall can exclude them for that session. |
user_message | string | Yes | The user's message or question from this turn. Used for context retrieval and memory extraction. |
project_context | string | null | — | Current project or workspace name for scoping memories, e.g. 'mentedb-mcp' or 'my-app'. |
assistant_response | string | null | — | The assistant's response from this turn. Can be empty if calling before drafting a response. |
Parameters from the server's own tool schema.
The tool writes/stores new memory data on every conversation turn, which is a persistent write operation. It also reads/retrieves context, but since it spans both Read and Write, the more severe Write category applies.
From the tool's definition 'Stores new memories and returns relevant context from past conversations. MUST be called every turn.'
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
Process a conversation turn. Stores new memories and returns relevant context from past conversations. MUST be called every turn. It is categorised as a Write tool in the Mentedb MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
process_turn accepts 6 parameters: turn_id, agent_id, session_id, user_message, project_context, assistant_response. Required: turn_id, user_message. The full parameter table on this page comes from the server's own tool schema.
Register the Mentedb MCP server in PolicyLayer and add a rule for process_turn: 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 Mentedb. Nothing to install.
process_turn 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 process_turn 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 process_turn. 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.
process_turn is provided by the Mentedb MCP server (mentedb-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →