Skip to main content
Glama

notion_replace_file

Replace a file inside an existing Notion block in place. Update documents without changing the block's position on the page.

Instructions

Replace the file inside an EXISTING file/image/pdf/video/audio block, in place — the block keeps its position on the page. Use this to update a document without re-arranging anything; use notion_upload_file(position=...) to add a new block instead.

block_id: the file block to update (from notion_list_files_on_page or notion_read_page(include_block_ids=True)). source: same schemes as notion_upload_file (local:, shared:, drive:, base64:). caption: when non-empty, replaces the caption; when empty, the existing caption is left untouched.

The new file must map to the same block type as the existing block (e.g. you cannot replace an image block's content with a PDF — Notion blocks are typed). In that case delete the block and upload anew.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
captionNo
block_idYes
filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It transparently states that the replacement happens in-place, that the block position is preserved, and that the caption is only replaced when non-empty. It does not explicitly state reversibility/permissions, but the core destructive behavior is clearly communicated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence earns its place: the main behavior, usage direction, parameter details, and a caveat about type constraints. It is front-loaded with the key action and remains compact without repetition.

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?

The description covers the essential context: what the tool does, when to use it, where to obtain block_id, how to specify the source, caption behavior, and a fallback action for type mismatch. An output schema exists, so not detailing return values is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains block_id, source (with scheme examples), and caption semantics thoroughly, but the 'filename' parameter is not mentioned at all. The source reference to notion_upload_file assumes the agent already knows those schemes, which slightly weakens self-containedness.

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 opens with a specific action: 'Replace the file inside an EXISTING file/image/pdf/video/audio block, in place — the block keeps its position on the page.' It clearly distinguishes itself from the sibling notion_upload_file by contrasting updating an existing block versus adding a new one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use guidance is provided: 'Use this to update a document without re-arranging anything; use notion_upload_file(position=...) to add a new block instead.' It also covers the edge case of block type mismatch and instructs to delete and upload anew.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snickery/notion-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server