Twilio · Capability

Twilio SendGrid Email API — Contacts

Twilio SendGrid Email API — Contacts. 4 operations. Lead operation: Twilio List Marketing Contacts. Self-contained Naftiko capability covering one Twilio business surface.

Run with Naftiko TwilioContacts

What You Can Do

GET
Listcontacts — Twilio List Marketing Contacts
/v1/marketing/contacts
PUT
Upsertcontacts — Twilio Add or Update Contacts
/v1/marketing/contacts
DELETE
Deletecontacts — Twilio Delete Contacts
/v1/marketing/contacts
POST
Searchcontacts — Twilio Search Contacts
/v1/marketing/contacts/search

MCP Tools

twilio-list-marketing-contacts

Twilio List Marketing Contacts

read-only idempotent
twilio-add-update-contacts

Twilio Add or Update Contacts

idempotent
twilio-delete-contacts

Twilio Delete Contacts

idempotent
twilio-search-contacts

Twilio Search Contacts

read-only

Capability Spec

sendgrid-contacts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Twilio SendGrid Email API — Contacts
  description: 'Twilio SendGrid Email API — Contacts. 4 operations. Lead operation: Twilio List Marketing Contacts. Self-contained
    Naftiko capability covering one Twilio business surface.'
  tags:
  - Twilio
  - Contacts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TWILIO_API_KEY: TWILIO_API_KEY
capability:
  consumes:
  - type: http
    namespace: sendgrid-contacts
    baseUri: https://api.sendgrid.com/v3
    description: Twilio SendGrid Email API — Contacts business capability. Self-contained, no shared references.
    resources:
    - name: marketing-contacts
      path: /marketing/contacts
      operations:
      - name: listcontacts
        method: GET
        description: Twilio List Marketing Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: upsertcontacts
        method: PUT
        description: Twilio Add or Update Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecontacts
        method: DELETE
        description: Twilio Delete Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: string
          description: Comma-separated contact IDs
          required: true
    - name: marketing-contacts-search
      path: /marketing/contacts/search
      operations:
      - name: searchcontacts
        method: POST
        description: Twilio Search Contacts
        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.TWILIO_API_KEY}}'
  exposes:
  - type: rest
    namespace: sendgrid-contacts-rest
    port: 8080
    description: REST adapter for Twilio SendGrid Email API — Contacts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/marketing/contacts
      name: marketing-contacts
      description: REST surface for marketing-contacts.
      operations:
      - method: GET
        name: listcontacts
        description: Twilio List Marketing Contacts
        call: sendgrid-contacts.listcontacts
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: upsertcontacts
        description: Twilio Add or Update Contacts
        call: sendgrid-contacts.upsertcontacts
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecontacts
        description: Twilio Delete Contacts
        call: sendgrid-contacts.deletecontacts
        with:
          ids: rest.ids
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketing/contacts/search
      name: marketing-contacts-search
      description: REST surface for marketing-contacts-search.
      operations:
      - method: POST
        name: searchcontacts
        description: Twilio Search Contacts
        call: sendgrid-contacts.searchcontacts
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: sendgrid-contacts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Twilio SendGrid Email API — Contacts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: twilio-list-marketing-contacts
      description: Twilio List Marketing Contacts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: sendgrid-contacts.listcontacts
      outputParameters:
      - type: object
        mapping: $.
    - name: twilio-add-update-contacts
      description: Twilio Add or Update Contacts
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: sendgrid-contacts.upsertcontacts
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: twilio-delete-contacts
      description: Twilio Delete Contacts
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: sendgrid-contacts.deletecontacts
      with:
        ids: tools.ids
      outputParameters:
      - type: object
        mapping: $.
    - name: twilio-search-contacts
      description: Twilio Search Contacts
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: sendgrid-contacts.searchcontacts
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.