Jupyter Notebook · Capability

Jupyter Notebook REST API — Contents

Jupyter Notebook REST API — Contents. 8 operations. Lead operation: Jupyter Notebook Get contents. Self-contained Naftiko capability covering one Jupyter Notebook business surface.

Run with Naftiko Jupyter NotebookContents

What You Can Do

GET
Getcontents — Jupyter Notebook Get contents
/v1/api/contents/{path}
POST
Createcontent — Jupyter Notebook Create a new file or directory
/v1/api/contents/{path}
PUT
Updatecontent — Jupyter Notebook Save or upload content
/v1/api/contents/{path}
PATCH
Renamecontent — Jupyter Notebook Rename a file or directory
/v1/api/contents/{path}
DELETE
Deletecontent — Jupyter Notebook Delete a file or directory
/v1/api/contents/{path}
GET
Listcheckpoints — Jupyter Notebook List checkpoints
/v1/api/contents/{path}/checkpoints
POST
Createcheckpoint — Jupyter Notebook Create a checkpoint
/v1/api/contents/{path}/checkpoints
DELETE
Deletecheckpoint — Jupyter Notebook Delete a checkpoint
/v1/api/contents/{path}/checkpoints/{checkpoint-id}

MCP Tools

jupyter-notebook-get-contents

Jupyter Notebook Get contents

read-only idempotent
jupyter-notebook-create-new-file

Jupyter Notebook Create a new file or directory

jupyter-notebook-save-upload-content

Jupyter Notebook Save or upload content

idempotent
jupyter-notebook-rename-file-directory

Jupyter Notebook Rename a file or directory

idempotent
jupyter-notebook-delete-file-directory

Jupyter Notebook Delete a file or directory

idempotent
jupyter-notebook-list-checkpoints

Jupyter Notebook List checkpoints

read-only idempotent
jupyter-notebook-create-checkpoint

Jupyter Notebook Create a checkpoint

jupyter-notebook-delete-checkpoint

Jupyter Notebook Delete a checkpoint

idempotent

Capability Spec

rest-contents.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Jupyter Notebook REST API — Contents
  description: 'Jupyter Notebook REST API — Contents. 8 operations. Lead operation: Jupyter Notebook Get contents. Self-contained
    Naftiko capability covering one Jupyter Notebook business surface.'
  tags:
  - Jupyter Notebook
  - Contents
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    JUPYTER_NOTEBOOK_API_KEY: JUPYTER_NOTEBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-contents
    baseUri: http://localhost:8888/api
    description: Jupyter Notebook REST API — Contents business capability. Self-contained, no shared references.
    resources:
    - name: api-contents-path
      path: /api/contents/{path}
      operations:
      - name: getcontents
        method: GET
        description: Jupyter Notebook Get contents
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path to the file or directory relative to the root directory.
          required: true
        - name: type
          in: query
          type: string
          description: Type of content to return. Can be 'file', 'directory', or 'notebook'. If unspecified, the server will
            determine the type.
        - name: format
          in: query
          type: string
          description: Format of the content field. For files, can be 'text' or 'base64'. For notebooks, can be 'json'.
        - name: content
          in: query
          type: integer
          description: Whether to include the content field. Set to 0 to exclude content, which is useful for listing directories.
        - name: hash
          in: query
          type: integer
          description: Whether to include the hash field. Set to 1 to include a hash of the content.
      - name: createcontent
        method: POST
        description: Jupyter Notebook Create a new file or directory
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path where the new content should be created.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: updatecontent
        method: PUT
        description: Jupyter Notebook Save or upload content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path of the content to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: renamecontent
        method: PATCH
        description: Jupyter Notebook Rename a file or directory
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Current path of the content.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecontent
        method: DELETE
        description: Jupyter Notebook Delete a file or directory
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path of the content to delete.
          required: true
    - name: api-contents-path-checkpoints
      path: /api/contents/{path}/checkpoints
      operations:
      - name: listcheckpoints
        method: GET
        description: Jupyter Notebook List checkpoints
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path to the content.
          required: true
      - name: createcheckpoint
        method: POST
        description: Jupyter Notebook Create a checkpoint
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path to the content.
          required: true
    - name: api-contents-path-checkpoints-checkpoint_id
      path: /api/contents/{path}/checkpoints/{checkpoint_id}
      operations:
      - name: deletecheckpoint
        method: DELETE
        description: Jupyter Notebook Delete a checkpoint
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: path
          in: path
          type: string
          description: Path to the content.
          required: true
        - name: checkpoint_id
          in: path
          type: string
          description: ID of the checkpoint to delete.
          required: true
    authentication:
      type: apikey
      key: token
      value: '{{env.JUPYTER_NOTEBOOK_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: rest-contents-rest
    port: 8080
    description: REST adapter for Jupyter Notebook REST API — Contents. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/contents/{path}
      name: api-contents-path
      description: REST surface for api-contents-path.
      operations:
      - method: GET
        name: getcontents
        description: Jupyter Notebook Get contents
        call: rest-contents.getcontents
        with:
          path: rest.path
          type: rest.type
          format: rest.format
          content: rest.content
          hash: rest.hash
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcontent
        description: Jupyter Notebook Create a new file or directory
        call: rest-contents.createcontent
        with:
          path: rest.path
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatecontent
        description: Jupyter Notebook Save or upload content
        call: rest-contents.updatecontent
        with:
          path: rest.path
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: renamecontent
        description: Jupyter Notebook Rename a file or directory
        call: rest-contents.renamecontent
        with:
          path: rest.path
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecontent
        description: Jupyter Notebook Delete a file or directory
        call: rest-contents.deletecontent
        with:
          path: rest.path
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/contents/{path}/checkpoints
      name: api-contents-path-checkpoints
      description: REST surface for api-contents-path-checkpoints.
      operations:
      - method: GET
        name: listcheckpoints
        description: Jupyter Notebook List checkpoints
        call: rest-contents.listcheckpoints
        with:
          path: rest.path
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcheckpoint
        description: Jupyter Notebook Create a checkpoint
        call: rest-contents.createcheckpoint
        with:
          path: rest.path
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/contents/{path}/checkpoints/{checkpoint-id}
      name: api-contents-path-checkpoints-checkpoint-id
      description: REST surface for api-contents-path-checkpoints-checkpoint_id.
      operations:
      - method: DELETE
        name: deletecheckpoint
        description: Jupyter Notebook Delete a checkpoint
        call: rest-contents.deletecheckpoint
        with:
          path: rest.path
          checkpoint_id: rest.checkpoint_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-contents-mcp
    port: 9090
    transport: http
    description: MCP adapter for Jupyter Notebook REST API — Contents. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: jupyter-notebook-get-contents
      description: Jupyter Notebook Get contents
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-contents.getcontents
      with:
        path: tools.path
        type: tools.type
        format: tools.format
        content: tools.content
        hash: tools.hash
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-create-new-file
      description: Jupyter Notebook Create a new file or directory
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-contents.createcontent
      with:
        path: tools.path
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-save-upload-content
      description: Jupyter Notebook Save or upload content
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-contents.updatecontent
      with:
        path: tools.path
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-rename-file-directory
      description: Jupyter Notebook Rename a file or directory
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-contents.renamecontent
      with:
        path: tools.path
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-delete-file-directory
      description: Jupyter Notebook Delete a file or directory
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-contents.deletecontent
      with:
        path: tools.path
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-list-checkpoints
      description: Jupyter Notebook List checkpoints
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-contents.listcheckpoints
      with:
        path: tools.path
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-create-checkpoint
      description: Jupyter Notebook Create a checkpoint
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-contents.createcheckpoint
      with:
        path: tools.path
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyter-notebook-delete-checkpoint
      description: Jupyter Notebook Delete a checkpoint
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-contents.deletecheckpoint
      with:
        path: tools.path
        checkpoint_id: tools.checkpoint_id
      outputParameters:
      - type: object
        mapping: $.