get-block
Retrieve specific Notion blocks by ID to access content, structure, or properties within your workspace.
Instructions
Retrieve a block by its ID
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"block_id": "<block_id>"
},
"name": "get-block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the block to retrieve |
Implementation Reference
- server.js:594-610 (handler)The handler logic for the 'get-block' tool. It extracts the block_id from arguments, removes any dashes from the ID, retrieves the block using the Notion SDK's notion.blocks.retrieve method, and returns the response as a JSON string in a text content block.
else if (name === "get-block") { let { block_id } = args; // Remove dashes if present in block_id block_id = block_id.replace(/-/g, ""); const response = await notion.blocks.retrieve({ block_id }); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } - server.js:268-281 (registration)Registration of the 'get-block' tool in the response to the tools/list MCP method, providing the tool's name, description, and input schema.
{ name: "get-block", description: "Retrieve a block by its ID", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the block to retrieve" } }, required: ["block_id"] } }, - server.js:271-280 (schema)Input schema definition for the 'get-block' tool, specifying that a string 'block_id' is required.
inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the block to retrieve" } }, required: ["block_id"] }