naftiko: 1.0.0-alpha2 info: label: Pipedrive API v2 — Activities description: 'Pipedrive API v2 — Activities. 5 operations. Lead operation: Get all activities. Self-contained Naftiko capability covering one Pipedrive business surface.' tags: - Pipedrive - Activities created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PIPEDRIVE_API_KEY: PIPEDRIVE_API_KEY capability: consumes: - type: http namespace: v2-activities baseUri: https://api.pipedrive.com/api/v2 description: Pipedrive API v2 — Activities business capability. Self-contained, no shared references. resources: - name: activities path: /activities operations: - name: getactivities method: GET description: Get all activities outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: filter_id in: query type: integer description: If supplied, only activities matching the specified filter are returned - name: ids in: query type: string description: Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist - name: owner_id in: query type: integer description: If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored. - name: deal_id in: query type: integer description: If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored. - name: lead_id in: query type: string description: If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. - name: person_id in: query type: integer description: If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. - name: org_id in: query type: integer description: If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. - name: done in: query type: boolean description: If supplied, only activities with specified 'done' flag value are returned - name: updated_since in: query type: string description: If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. - name: updated_until in: query type: string description: If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. - name: sort_by in: query type: string description: 'The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`.' - name: sort_direction in: query type: string description: 'The sorting direction. Supported values: `asc`, `desc`.' - name: include_fields in: query type: string description: Optional comma separated string array of additional fields to include - name: limit in: query type: integer description: For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. - name: cursor in: query type: string description: For pagination, the marker (an opaque string value) representing the first item on the next page - name: addactivity method: POST description: Add a new activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: activities-id path: /activities/{id} operations: - name: deleteactivity method: DELETE description: Delete an activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the activity required: true - name: getactivity method: GET description: Get details of an activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the activity required: true - name: include_fields in: query type: string description: Optional comma separated string array of additional fields to include - name: updateactivity method: PATCH description: Update an activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the activity required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.PIPEDRIVE_API_KEY}}' exposes: - type: rest namespace: v2-activities-rest port: 8080 description: REST adapter for Pipedrive API v2 — Activities. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/activities name: activities description: REST surface for activities. operations: - method: GET name: getactivities description: Get all activities call: v2-activities.getactivities with: filter_id: rest.filter_id ids: rest.ids owner_id: rest.owner_id deal_id: rest.deal_id lead_id: rest.lead_id person_id: rest.person_id org_id: rest.org_id done: rest.done updated_since: rest.updated_since updated_until: rest.updated_until sort_by: rest.sort_by sort_direction: rest.sort_direction include_fields: rest.include_fields limit: rest.limit cursor: rest.cursor outputParameters: - type: object mapping: $. - method: POST name: addactivity description: Add a new activity call: v2-activities.addactivity with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/activities/{id} name: activities-id description: REST surface for activities-id. operations: - method: DELETE name: deleteactivity description: Delete an activity call: v2-activities.deleteactivity with: id: rest.id outputParameters: - type: object mapping: $. - method: GET name: getactivity description: Get details of an activity call: v2-activities.getactivity with: id: rest.id include_fields: rest.include_fields outputParameters: - type: object mapping: $. - method: PATCH name: updateactivity description: Update an activity call: v2-activities.updateactivity with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: v2-activities-mcp port: 9090 transport: http description: MCP adapter for Pipedrive API v2 — Activities. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-all-activities description: Get all activities hints: readOnly: true destructive: false idempotent: true call: v2-activities.getactivities with: filter_id: tools.filter_id ids: tools.ids owner_id: tools.owner_id deal_id: tools.deal_id lead_id: tools.lead_id person_id: tools.person_id org_id: tools.org_id done: tools.done updated_since: tools.updated_since updated_until: tools.updated_until sort_by: tools.sort_by sort_direction: tools.sort_direction include_fields: tools.include_fields limit: tools.limit cursor: tools.cursor outputParameters: - type: object mapping: $. - name: add-new-activity description: Add a new activity hints: readOnly: false destructive: false idempotent: false call: v2-activities.addactivity with: body: tools.body outputParameters: - type: object mapping: $. - name: delete-activity description: Delete an activity hints: readOnly: false destructive: true idempotent: true call: v2-activities.deleteactivity with: id: tools.id outputParameters: - type: object mapping: $. - name: get-details-activity description: Get details of an activity hints: readOnly: true destructive: false idempotent: true call: v2-activities.getactivity with: id: tools.id include_fields: tools.include_fields outputParameters: - type: object mapping: $. - name: update-activity description: Update an activity hints: readOnly: false destructive: false idempotent: true call: v2-activities.updateactivity with: id: tools.id body: tools.body outputParameters: - type: object mapping: $.