AI agents use push_documents_to_lens_kb to create or update resources in Lens — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Lens environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Document text content to upload |
file_name | string | — | File name for the upload (default: document.txt) |
knowledge_base_id | string | Yes | Knowledge base UUID (from list_knowledge_bases) |
Parameters from the server's own tool schema.
This tool creates or uploads documents to a knowledge base, which is a reversible write operation. It does not execute code, delete data irreversibly, or move money. The 'medium' severity reflects that an AI agent uploading malicious or sensitive documents to a shared knowledge base could cause information integrity issues or expose sensitive data to unauthorized access, but the operation itself is reversible…
From the tool's definition Tool description states 'Upload a document (text content) to a Lens knowledge base', which is a create/modify operation that adds new content to a persistent store.
Risk signalsAccepts raw HTML/template content (content)
Attacks that exploit this kind of access
Upload a document (text content) to a Lens knowledge base. Use list_knowledge_bases to get the KB id. Content is sent as a single file; file_name is optional (default document.txt). It is categorised as a Write tool in the Lens MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
push_documents_to_lens_kb accepts 3 parameters: content, file_name, knowledge_base_id. Required: content, knowledge_base_id. The full parameter table on this page comes from the server's own tool schema.
Register the Lens MCP server in PolicyLayer and add a rule for push_documents_to_lens_kb: 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 Lens. Nothing to install.
push_documents_to_lens_kb 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 push_documents_to_lens_kb 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 push_documents_to_lens_kb. 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.
push_documents_to_lens_kb is provided by the Lens MCP server (lens-mcp-server). 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 →