Plandex · Capability

Plandex Server — Context & Diffs

Plandex Server — Context & Diffs. Manages files, directories, URLs, notes, and images loaded into a plan branch, and operates on pending diffs (apply, reject, list). Self-contained Naftiko capability covering the context/diff surface of the Plandex REST API.

Run with Naftiko PlandexContextDiffsFile Map

What You Can Do

GET
Listcontext — List Context
/v1/plans/{planid}/{branch}/context
POST
Loadcontext — Load Context
/v1/plans/{planid}/{branch}/context
PUT
Updatecontext — Update Context
/v1/plans/{planid}/{branch}/context
DELETE
Deletecontext — Delete Context
/v1/plans/{planid}/{branch}/context
GET
Getcontextbody — Get Context Body
/v1/plans/{planid}/{branch}/context/{contextid}/body
GET
Getplandiffs — Get Plan Diffs
/v1/plans/{planid}/{branch}/diffs
PATCH
Applyplan — Apply Plan Changes
/v1/plans/{planid}/{branch}/apply
PATCH
Rejectallchanges — Reject All Plan Changes
/v1/plans/{planid}/{branch}/reject-all
PATCH
Rejectfile — Reject Plan File Change
/v1/plans/{planid}/{branch}/reject-file
PATCH
Rejectfiles — Reject Multiple File Changes
/v1/plans/{planid}/{branch}/reject-files
POST
Getfilemap — Get File Map
/v1/file-map

MCP Tools

list-context

List Context

read-only idempotent
load-context

Load Context

update-context

Update Context

idempotent
delete-context

Delete Context

idempotent
get-context-body

Get Context Body

read-only idempotent
get-plan-diffs

Get Plan Diffs

read-only idempotent
apply-plan

Apply Plan Changes

reject-all-changes

Reject All Plan Changes

idempotent
reject-file

Reject Plan File Change

idempotent
reject-files

Reject Multiple File Changes

idempotent
get-file-map

Get File Map

read-only idempotent

Capability Spec

plandex-context-and-diffs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Plandex Server — Context & Diffs
  description: 'Plandex Server — Context & Diffs. Manages files, directories, URLs, notes, and images loaded into a plan branch, and operates on pending diffs (apply, reject, list). Self-contained Naftiko capability covering the context/diff surface of the Plandex REST API.'
  tags:
    - Plandex
    - Context
    - Diffs
    - File Map
  created: '2026-05-29'
  modified: '2026-05-29'
binds:
  - namespace: env
    keys:
      PLANDEX_BASE_URL: PLANDEX_BASE_URL
      PLANDEX_API_TOKEN: PLANDEX_API_TOKEN
capability:
  consumes:
    - type: http
      namespace: plandex-context-diffs
      baseUri: '{{env.PLANDEX_BASE_URL}}'
      description: Plandex Server context and diffs surface. Defaults to http://localhost:8099 for local-mode deployments.
      resources:
        - name: plans-planId-branch-context
          path: /plans/{planId}/{branch}/context
          operations:
            - name: listcontext
              method: GET
              description: List Context
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
            - name: loadcontext
              method: POST
              description: Load Context
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
            - name: updatecontext
              method: PUT
              description: Update Context
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
            - name: deletecontext
              method: DELETE
              description: Delete Context
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-context-body
          path: /plans/{planId}/{branch}/context/{contextId}/body
          operations:
            - name: getcontextbody
              method: GET
              description: Get Context Body
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-diffs
          path: /plans/{planId}/{branch}/diffs
          operations:
            - name: getplandiffs
              method: GET
              description: Get Plan Diffs
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-apply
          path: /plans/{planId}/{branch}/apply
          operations:
            - name: applyplan
              method: PATCH
              description: Apply Plan Changes
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-reject-all
          path: /plans/{planId}/{branch}/reject_all
          operations:
            - name: rejectallchanges
              method: PATCH
              description: Reject All Plan Changes
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-reject-file
          path: /plans/{planId}/{branch}/reject_file
          operations:
            - name: rejectfile
              method: PATCH
              description: Reject Plan File Change
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: plans-planId-branch-reject-files
          path: /plans/{planId}/{branch}/reject_files
          operations:
            - name: rejectfiles
              method: PATCH
              description: Reject Multiple File Changes
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
        - name: file-map
          path: /file_map
          operations:
            - name: getfilemap
              method: POST
              description: Get File Map
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: $.
      authentication:
        type: bearer
        token: '{{env.PLANDEX_API_TOKEN}}'
  exposes:
    - type: rest
      namespace: plandex-context-diffs-rest
      port: 8080
      description: REST adapter for Plandex Server context & diffs. One Spectral-compliant resource per consumed operation, prefixed with /v1.
      resources:
        - path: /v1/plans/{planid}/{branch}/context
          name: plan-context
          description: REST surface for plan context.
          operations:
            - method: GET
              name: listcontext
              description: List Context
              call: plandex-context-diffs.listcontext
              outputParameters:
                - type: object
                  mapping: $.
            - method: POST
              name: loadcontext
              description: Load Context
              call: plandex-context-diffs.loadcontext
              outputParameters:
                - type: object
                  mapping: $.
            - method: PUT
              name: updatecontext
              description: Update Context
              call: plandex-context-diffs.updatecontext
              outputParameters:
                - type: object
                  mapping: $.
            - method: DELETE
              name: deletecontext
              description: Delete Context
              call: plandex-context-diffs.deletecontext
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/context/{contextid}/body
          name: plan-context-body
          description: REST surface for context item body.
          operations:
            - method: GET
              name: getcontextbody
              description: Get Context Body
              call: plandex-context-diffs.getcontextbody
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/diffs
          name: plan-diffs
          description: REST surface for plan diffs.
          operations:
            - method: GET
              name: getplandiffs
              description: Get Plan Diffs
              call: plandex-context-diffs.getplandiffs
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/apply
          name: plan-apply
          description: REST surface for plan apply.
          operations:
            - method: PATCH
              name: applyplan
              description: Apply Plan Changes
              call: plandex-context-diffs.applyplan
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/reject-all
          name: plan-reject-all
          description: REST surface for plan reject-all.
          operations:
            - method: PATCH
              name: rejectallchanges
              description: Reject All Plan Changes
              call: plandex-context-diffs.rejectallchanges
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/reject-file
          name: plan-reject-file
          description: REST surface for plan reject single file.
          operations:
            - method: PATCH
              name: rejectfile
              description: Reject Plan File Change
              call: plandex-context-diffs.rejectfile
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/plans/{planid}/{branch}/reject-files
          name: plan-reject-files
          description: REST surface for plan reject multiple files.
          operations:
            - method: PATCH
              name: rejectfiles
              description: Reject Multiple File Changes
              call: plandex-context-diffs.rejectfiles
              outputParameters:
                - type: object
                  mapping: $.
        - path: /v1/file-map
          name: file-map
          description: REST surface for tree-sitter file map generation.
          operations:
            - method: POST
              name: getfilemap
              description: Get File Map
              call: plandex-context-diffs.getfilemap
              outputParameters:
                - type: object
                  mapping: $.
    - type: mcp
      namespace: plandex-context-diffs-mcp
      port: 9090
      transport: http
      description: MCP adapter for Plandex Server context & diffs. One tool per consumed operation, routed inline through this capability's consumes block.
      tools:
        - name: list-context
          description: List Context
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: plandex-context-diffs.listcontext
          outputParameters:
            - type: object
              mapping: $.
        - name: load-context
          description: Load Context
          hints:
            readOnly: false
            destructive: false
            idempotent: false
          call: plandex-context-diffs.loadcontext
          outputParameters:
            - type: object
              mapping: $.
        - name: update-context
          description: Update Context
          hints:
            readOnly: false
            destructive: false
            idempotent: true
          call: plandex-context-diffs.updatecontext
          outputParameters:
            - type: object
              mapping: $.
        - name: delete-context
          description: Delete Context
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: plandex-context-diffs.deletecontext
          outputParameters:
            - type: object
              mapping: $.
        - name: get-context-body
          description: Get Context Body
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: plandex-context-diffs.getcontextbody
          outputParameters:
            - type: object
              mapping: $.
        - name: get-plan-diffs
          description: Get Plan Diffs
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: plandex-context-diffs.getplandiffs
          outputParameters:
            - type: object
              mapping: $.
        - name: apply-plan
          description: Apply Plan Changes
          hints:
            readOnly: false
            destructive: true
            idempotent: false
          call: plandex-context-diffs.applyplan
          outputParameters:
            - type: object
              mapping: $.
        - name: reject-all-changes
          description: Reject All Plan Changes
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: plandex-context-diffs.rejectallchanges
          outputParameters:
            - type: object
              mapping: $.
        - name: reject-file
          description: Reject Plan File Change
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: plandex-context-diffs.rejectfile
          outputParameters:
            - type: object
              mapping: $.
        - name: reject-files
          description: Reject Multiple File Changes
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: plandex-context-diffs.rejectfiles
          outputParameters:
            - type: object
              mapping: $.
        - name: get-file-map
          description: Get File Map
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: plandex-context-diffs.getfilemap
          outputParameters:
            - type: object
              mapping: $.