Skip to main content
Glama

get-block

Retrieve specific Notion content blocks using their unique ID with the 'get-block' tool, integrating directly into the Notion MCP Server for AI-driven workspace management and content organization.

Instructions

Retrieve a block by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idYesID of the block to retrieve

Implementation Reference

  • The main handler for the 'get-block' tool. It extracts the block_id from arguments, removes any dashes from the ID, retrieves the block using the Notion API (notion.blocks.retrieve), and returns the JSON-stringified response wrapped 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:266-279 (registration)
    Registration of the 'get-block' tool in the tools/list response, including its name, description, and input schema requiring a 'block_id' string.
    { 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"] } },
  • Input schema for the 'get-block' tool, defining the required 'block_id' parameter.
    inputSchema: { type: "object", properties: { block_id: { type: "string", description: "ID of the block to retrieve" } }, required: ["block_id"] }

Other Tools

Related 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/emmanuelsystems/mcpnotionslack'

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