Microsoft · Capability

Microsoft Graph API — Mail

Microsoft Graph API — Mail. 7 operations. Lead operation: Microsoft List mail folders. Self-contained Naftiko capability covering one Microsoft business surface.

Run with Naftiko MicrosoftMail

What You Can Do

GET
Listmailfolders — Microsoft List mail folders
/v1/me/mailfolders
GET
Listmessages — Microsoft List messages
/v1/me/messages
POST
Createmessage — Microsoft Create message draft
/v1/me/messages
GET
Getmessage — Microsoft Get message
/v1/me/messages/{message-id}
PATCH
Updatemessage — Microsoft Update message
/v1/me/messages/{message-id}
DELETE
Deletemessage — Microsoft Delete message
/v1/me/messages/{message-id}
POST
Sendmail — Microsoft Send mail
/v1/me/sendmail

MCP Tools

microsoft-list-mail-folders

Microsoft List mail folders

read-only idempotent
microsoft-list-messages

Microsoft List messages

read-only idempotent
microsoft-create-message-draft

Microsoft Create message draft

microsoft-get-message

Microsoft Get message

read-only idempotent
microsoft-update-message

Microsoft Update message

idempotent
microsoft-delete-message

Microsoft Delete message

idempotent
microsoft-send-mail

Microsoft Send mail

Capability Spec

graph-mail.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Microsoft Graph API — Mail
  description: 'Microsoft Graph API — Mail. 7 operations. Lead operation: Microsoft List mail folders. Self-contained Naftiko
    capability covering one Microsoft business surface.'
  tags:
  - Microsoft
  - Mail
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_API_KEY: MICROSOFT_API_KEY
capability:
  consumes:
  - type: http
    namespace: graph-mail
    baseUri: https://graph.microsoft.com/v1.0
    description: Microsoft Graph API — Mail business capability. Self-contained, no shared references.
    resources:
    - name: me-mailFolders
      path: /me/mailFolders
      operations:
      - name: listmailfolders
        method: GET
        description: Microsoft List mail folders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: me-messages
      path: /me/messages
      operations:
      - name: listmessages
        method: GET
        description: Microsoft List messages
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createmessage
        method: POST
        description: Microsoft Create message draft
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: me-messages-message-id
      path: /me/messages/{message-id}
      operations:
      - name: getmessage
        method: GET
        description: Microsoft Get message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatemessage
        method: PATCH
        description: Microsoft Update message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletemessage
        method: DELETE
        description: Microsoft Delete message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: me-sendMail
      path: /me/sendMail
      operations:
      - name: sendmail
        method: POST
        description: Microsoft Send mail
        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_API_KEY}}'
  exposes:
  - type: rest
    namespace: graph-mail-rest
    port: 8080
    description: REST adapter for Microsoft Graph API — Mail. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/me/mailfolders
      name: me-mailfolders
      description: REST surface for me-mailFolders.
      operations:
      - method: GET
        name: listmailfolders
        description: Microsoft List mail folders
        call: graph-mail.listmailfolders
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/me/messages
      name: me-messages
      description: REST surface for me-messages.
      operations:
      - method: GET
        name: listmessages
        description: Microsoft List messages
        call: graph-mail.listmessages
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createmessage
        description: Microsoft Create message draft
        call: graph-mail.createmessage
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/me/messages/{message-id}
      name: me-messages-message-id
      description: REST surface for me-messages-message-id.
      operations:
      - method: GET
        name: getmessage
        description: Microsoft Get message
        call: graph-mail.getmessage
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatemessage
        description: Microsoft Update message
        call: graph-mail.updatemessage
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletemessage
        description: Microsoft Delete message
        call: graph-mail.deletemessage
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/me/sendmail
      name: me-sendmail
      description: REST surface for me-sendMail.
      operations:
      - method: POST
        name: sendmail
        description: Microsoft Send mail
        call: graph-mail.sendmail
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: graph-mail-mcp
    port: 9090
    transport: http
    description: MCP adapter for Microsoft Graph API — Mail. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: microsoft-list-mail-folders
      description: Microsoft List mail folders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: graph-mail.listmailfolders
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-list-messages
      description: Microsoft List messages
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: graph-mail.listmessages
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-create-message-draft
      description: Microsoft Create message draft
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: graph-mail.createmessage
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-get-message
      description: Microsoft Get message
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: graph-mail.getmessage
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-update-message
      description: Microsoft Update message
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: graph-mail.updatemessage
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-delete-message
      description: Microsoft Delete message
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: graph-mail.deletemessage
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-send-mail
      description: Microsoft Send mail
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: graph-mail.sendmail
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.