Microsoft Word · Capability

Microsoft Word JavaScript API — Tables

Microsoft Word JavaScript API — Tables. 2 operations. Lead operation: Microsoft Word List Tables. Self-contained Naftiko capability covering one Microsoft Word business surface.

Run with Naftiko Microsoft WordTables

What You Can Do

GET
Listtables — Microsoft Word List Tables
/v1/documents/{document-id}/tables
POST
Inserttable — Microsoft Word Insert Table
/v1/documents/{document-id}/tables

MCP Tools

microsoft-word-list-tables

Microsoft Word List Tables

read-only idempotent
microsoft-word-insert-table

Microsoft Word Insert Table

Capability Spec

javascript-tables.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Microsoft Word JavaScript API — Tables
  description: 'Microsoft Word JavaScript API — Tables. 2 operations. Lead operation: Microsoft Word List Tables. Self-contained
    Naftiko capability covering one Microsoft Word business surface.'
  tags:
  - Microsoft Word
  - Tables
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_WORD_API_KEY: MICROSOFT_WORD_API_KEY
capability:
  consumes:
  - type: http
    namespace: javascript-tables
    baseUri: https://word.officeapps.live.com/api/v1
    description: Microsoft Word JavaScript API — Tables business capability. Self-contained, no shared references.
    resources:
    - name: documents-document-id-tables
      path: /documents/{document-id}/tables
      operations:
      - name: listtables
        method: GET
        description: Microsoft Word List Tables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: inserttable
        method: POST
        description: Microsoft Word Insert Table
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_WORD_API_KEY}}'
  exposes:
  - type: rest
    namespace: javascript-tables-rest
    port: 8080
    description: REST adapter for Microsoft Word JavaScript API — Tables. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/documents/{document-id}/tables
      name: documents-document-id-tables
      description: REST surface for documents-document-id-tables.
      operations:
      - method: GET
        name: listtables
        description: Microsoft Word List Tables
        call: javascript-tables.listtables
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: inserttable
        description: Microsoft Word Insert Table
        call: javascript-tables.inserttable
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: javascript-tables-mcp
    port: 9090
    transport: http
    description: MCP adapter for Microsoft Word JavaScript API — Tables. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: microsoft-word-list-tables
      description: Microsoft Word List Tables
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: javascript-tables.listtables
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-word-insert-table
      description: Microsoft Word Insert Table
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: javascript-tables.inserttable
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.