Microsoft SharePoint · Capability

SharePoint REST API — Lists

SharePoint REST API — Lists. 3 operations. Lead operation: SharePoint Get Lists. Self-contained Naftiko capability covering one Sharepoint business surface.

Run with Naftiko SharepointLists

What You Can Do

GET
Getlists — SharePoint Get Lists
/v1/web/lists
POST
Createlist — SharePoint Create List
/v1/web/lists
GET
Getlistbytitle — SharePoint Get List by Title
/v1/web/lists/getbytitle-list-title

MCP Tools

sharepoint-get-lists

SharePoint Get Lists

read-only idempotent
sharepoint-create-list

SharePoint Create List

sharepoint-get-list-title

SharePoint Get List by Title

read-only idempotent

Capability Spec

rest-lists.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SharePoint REST API — Lists
  description: 'SharePoint REST API — Lists. 3 operations. Lead operation: SharePoint Get Lists. Self-contained Naftiko capability
    covering one Sharepoint business surface.'
  tags:
  - Sharepoint
  - Lists
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SHAREPOINT_API_KEY: SHAREPOINT_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-lists
    baseUri: https://{site_url}/_api
    description: SharePoint REST API — Lists business capability. Self-contained, no shared references.
    resources:
    - name: web-lists
      path: /web/lists
      operations:
      - name: getlists
        method: GET
        description: SharePoint Get Lists
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: $select
          in: query
          type: string
          description: Properties to return.
        - name: $filter
          in: query
          type: string
          description: OData filter expression.
        - name: $top
          in: query
          type: integer
          description: Maximum results to return.
      - name: createlist
        method: POST
        description: SharePoint Create List
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: web-lists-getbytitle('{list_title}')
      path: /web/lists/getbytitle('{list_title}')
      operations:
      - name: getlistbytitle
        method: GET
        description: SharePoint Get List by Title
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: list_title
          in: path
          type: string
          description: Title of the list.
          required: true
    authentication:
      type: bearer
      token: '{{env.SHAREPOINT_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-lists-rest
    port: 8080
    description: REST adapter for SharePoint REST API — Lists. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/web/lists
      name: web-lists
      description: REST surface for web-lists.
      operations:
      - method: GET
        name: getlists
        description: SharePoint Get Lists
        call: rest-lists.getlists
        with:
          $select: rest.$select
          $filter: rest.$filter
          $top: rest.$top
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createlist
        description: SharePoint Create List
        call: rest-lists.createlist
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/web/lists/getbytitle-list-title
      name: web-lists-getbytitle-list-title
      description: REST surface for web-lists-getbytitle('{list_title}').
      operations:
      - method: GET
        name: getlistbytitle
        description: SharePoint Get List by Title
        call: rest-lists.getlistbytitle
        with:
          list_title: rest.list_title
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-lists-mcp
    port: 9090
    transport: http
    description: MCP adapter for SharePoint REST API — Lists. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: sharepoint-get-lists
      description: SharePoint Get Lists
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-lists.getlists
      with:
        $select: tools.$select
        $filter: tools.$filter
        $top: tools.$top
      outputParameters:
      - type: object
        mapping: $.
    - name: sharepoint-create-list
      description: SharePoint Create List
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-lists.createlist
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: sharepoint-get-list-title
      description: SharePoint Get List by Title
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-lists.getlistbytitle
      with:
        list_title: tools.list_title
      outputParameters:
      - type: object
        mapping: $.