Microsoft Dynamics · Capability

Microsoft Dynamics 365 Dataverse Web API — Leads

Microsoft Dynamics 365 Dataverse Web API — Leads. 5 operations. Lead operation: Microsoft Dynamics List leads. Self-contained Naftiko capability covering one Microsoft Dynamics business surface.

Run with Naftiko Microsoft DynamicsLeads

What You Can Do

GET
Listleads — Microsoft Dynamics List leads
/v1/leads
POST
Createlead — Microsoft Dynamics Create a lead
/v1/leads
GET
Getlead — Microsoft Dynamics Get a lead
/v1/leads-leadid
PATCH
Updatelead — Microsoft Dynamics Update a lead
/v1/leads-leadid
DELETE
Deletelead — Microsoft Dynamics Delete a lead
/v1/leads-leadid

MCP Tools

microsoft-dynamics-list-leads

Microsoft Dynamics List leads

read-only idempotent
microsoft-dynamics-create-lead

Microsoft Dynamics Create a lead

microsoft-dynamics-get-lead

Microsoft Dynamics Get a lead

read-only idempotent
microsoft-dynamics-update-lead

Microsoft Dynamics Update a lead

idempotent
microsoft-dynamics-delete-lead

Microsoft Dynamics Delete a lead

idempotent

Capability Spec

dataverse-leads.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Microsoft Dynamics 365 Dataverse Web API — Leads
  description: 'Microsoft Dynamics 365 Dataverse Web API — Leads. 5 operations. Lead operation: Microsoft Dynamics List leads.
    Self-contained Naftiko capability covering one Microsoft Dynamics business surface.'
  tags:
  - Microsoft Dynamics
  - Leads
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_DYNAMICS_API_KEY: MICROSOFT_DYNAMICS_API_KEY
capability:
  consumes:
  - type: http
    namespace: dataverse-leads
    baseUri: https://{organization}.api.crm.dynamics.com/api/data/v9.2
    description: Microsoft Dynamics 365 Dataverse Web API — Leads business capability. Self-contained, no shared references.
    resources:
    - name: leads
      path: /leads
      operations:
      - name: listleads
        method: GET
        description: Microsoft Dynamics List leads
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createlead
        method: POST
        description: Microsoft Dynamics Create a lead
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: leads({leadid})
      path: /leads({leadid})
      operations:
      - name: getlead
        method: GET
        description: Microsoft Dynamics Get a lead
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: leadid
          in: path
          type: string
          required: true
      - name: updatelead
        method: PATCH
        description: Microsoft Dynamics Update a lead
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: leadid
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletelead
        method: DELETE
        description: Microsoft Dynamics Delete a lead
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: leadid
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_DYNAMICS_API_KEY}}'
  exposes:
  - type: rest
    namespace: dataverse-leads-rest
    port: 8080
    description: REST adapter for Microsoft Dynamics 365 Dataverse Web API — Leads. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/leads
      name: leads
      description: REST surface for leads.
      operations:
      - method: GET
        name: listleads
        description: Microsoft Dynamics List leads
        call: dataverse-leads.listleads
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createlead
        description: Microsoft Dynamics Create a lead
        call: dataverse-leads.createlead
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/leads-leadid
      name: leads-leadid
      description: REST surface for leads({leadid}).
      operations:
      - method: GET
        name: getlead
        description: Microsoft Dynamics Get a lead
        call: dataverse-leads.getlead
        with:
          leadid: rest.leadid
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatelead
        description: Microsoft Dynamics Update a lead
        call: dataverse-leads.updatelead
        with:
          leadid: rest.leadid
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletelead
        description: Microsoft Dynamics Delete a lead
        call: dataverse-leads.deletelead
        with:
          leadid: rest.leadid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: dataverse-leads-mcp
    port: 9090
    transport: http
    description: MCP adapter for Microsoft Dynamics 365 Dataverse Web API — Leads. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: microsoft-dynamics-list-leads
      description: Microsoft Dynamics List leads
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: dataverse-leads.listleads
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-dynamics-create-lead
      description: Microsoft Dynamics Create a lead
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: dataverse-leads.createlead
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-dynamics-get-lead
      description: Microsoft Dynamics Get a lead
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: dataverse-leads.getlead
      with:
        leadid: tools.leadid
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-dynamics-update-lead
      description: Microsoft Dynamics Update a lead
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: dataverse-leads.updatelead
      with:
        leadid: tools.leadid
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-dynamics-delete-lead
      description: Microsoft Dynamics Delete a lead
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: dataverse-leads.deletelead
      with:
        leadid: tools.leadid
      outputParameters:
      - type: object
        mapping: $.