Notion · Capability

Notion API — Blocks

Notion API — Blocks. 5 operations. Lead operation: Notion Retrieve a block. Self-contained Naftiko capability covering one Notion business surface.

Run with Naftiko NotionBlocks

What You Can Do

GET
Retrieveblock — Notion Retrieve a block
/v1/blocks/{block-id}
PATCH
Updateblock — Notion Update a block
/v1/blocks/{block-id}
DELETE
Deleteblock — Notion Delete a block
/v1/blocks/{block-id}
GET
Retrieveblockchildren — Notion Retrieve block children
/v1/blocks/{block-id}/children
PATCH
Appendblockchildren — Notion Append block children
/v1/blocks/{block-id}/children

MCP Tools

notion-retrieve-block

Notion Retrieve a block

read-only idempotent
notion-update-block

Notion Update a block

idempotent
notion-delete-block

Notion Delete a block

idempotent
notion-retrieve-block-children

Notion Retrieve block children

read-only idempotent
notion-append-block-children

Notion Append block children

idempotent

Capability Spec

notion-blocks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Notion API — Blocks
  description: 'Notion API — Blocks. 5 operations. Lead operation: Notion Retrieve a block. Self-contained Naftiko capability
    covering one Notion business surface.'
  tags:
  - Notion
  - Blocks
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NOTION_API_KEY: NOTION_API_KEY
capability:
  consumes:
  - type: http
    namespace: notion-blocks
    baseUri: https://api.notion.com/v1
    description: Notion API — Blocks business capability. Self-contained, no shared references.
    resources:
    - name: blocks-block_id
      path: /blocks/{block_id}
      operations:
      - name: retrieveblock
        method: GET
        description: Notion Retrieve a block
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: block_id
          in: path
          type: string
          description: The ID of the block to retrieve.
          required: true
      - name: updateblock
        method: PATCH
        description: Notion Update a block
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: block_id
          in: path
          type: string
          description: The ID of the block to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteblock
        method: DELETE
        description: Notion Delete a block
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: block_id
          in: path
          type: string
          description: The ID of the block to delete (archive).
          required: true
    - name: blocks-block_id-children
      path: /blocks/{block_id}/children
      operations:
      - name: retrieveblockchildren
        method: GET
        description: Notion Retrieve block children
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: block_id
          in: path
          type: string
          description: The ID of the block whose children to retrieve. This can be a page ID to retrieve page content.
          required: true
        - name: start_cursor
          in: query
          type: string
          description: Pagination cursor to continue fetching results.
        - name: page_size
          in: query
          type: integer
          description: Maximum number of blocks to return (max 100).
      - name: appendblockchildren
        method: PATCH
        description: Notion Append block children
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: block_id
          in: path
          type: string
          description: The ID of the block to append children to. This can be a page ID to add content to a page.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.NOTION_API_KEY}}'
  exposes:
  - type: rest
    namespace: notion-blocks-rest
    port: 8080
    description: REST adapter for Notion API — Blocks. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/blocks/{block-id}
      name: blocks-block-id
      description: REST surface for blocks-block_id.
      operations:
      - method: GET
        name: retrieveblock
        description: Notion Retrieve a block
        call: notion-blocks.retrieveblock
        with:
          block_id: rest.block_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateblock
        description: Notion Update a block
        call: notion-blocks.updateblock
        with:
          block_id: rest.block_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteblock
        description: Notion Delete a block
        call: notion-blocks.deleteblock
        with:
          block_id: rest.block_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/blocks/{block-id}/children
      name: blocks-block-id-children
      description: REST surface for blocks-block_id-children.
      operations:
      - method: GET
        name: retrieveblockchildren
        description: Notion Retrieve block children
        call: notion-blocks.retrieveblockchildren
        with:
          block_id: rest.block_id
          start_cursor: rest.start_cursor
          page_size: rest.page_size
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: appendblockchildren
        description: Notion Append block children
        call: notion-blocks.appendblockchildren
        with:
          block_id: rest.block_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: notion-blocks-mcp
    port: 9090
    transport: http
    description: MCP adapter for Notion API — Blocks. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: notion-retrieve-block
      description: Notion Retrieve a block
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: notion-blocks.retrieveblock
      with:
        block_id: tools.block_id
      outputParameters:
      - type: object
        mapping: $.
    - name: notion-update-block
      description: Notion Update a block
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: notion-blocks.updateblock
      with:
        block_id: tools.block_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: notion-delete-block
      description: Notion Delete a block
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: notion-blocks.deleteblock
      with:
        block_id: tools.block_id
      outputParameters:
      - type: object
        mapping: $.
    - name: notion-retrieve-block-children
      description: Notion Retrieve block children
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: notion-blocks.retrieveblockchildren
      with:
        block_id: tools.block_id
        start_cursor: tools.start_cursor
        page_size: tools.page_size
      outputParameters:
      - type: object
        mapping: $.
    - name: notion-append-block-children
      description: Notion Append block children
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: notion-blocks.appendblockchildren
      with:
        block_id: tools.block_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.