naftiko: 1.0.0-alpha2 info: label: Pipedrive API v1 — Notes description: 'Pipedrive API v1 — Notes. 10 operations. Lead operation: Get all notes. Self-contained Naftiko capability covering one Pipedrive business surface.' tags: - Pipedrive - Notes created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PIPEDRIVE_API_KEY: PIPEDRIVE_API_KEY capability: consumes: - type: http namespace: v1-notes baseUri: https://api.pipedrive.com/v1 description: Pipedrive API v1 — Notes business capability. Self-contained, no shared references. resources: - name: notes path: /notes operations: - name: getnotes method: GET description: Get all notes outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: query type: integer description: The ID of the user whose notes to fetch. If omitted, notes by all users will be returned. - name: lead_id in: query type: string description: The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned. - name: deal_id in: query type: integer description: The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. - name: person_id in: query type: integer description: The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. - name: org_id in: query type: integer description: The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. - name: project_id in: query type: integer description: The ID of the project which notes to fetch. If omitted, notes about all projects will be returned. - name: task_id in: query type: integer description: The ID of the task which notes to fetch. If omitted, notes about all tasks will be returned. - name: start in: query type: integer description: Pagination start - name: limit in: query type: integer description: Items shown per page - name: sort in: query type: string description: The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Sup - name: start_date in: query type: string description: The date in format of YYYY-MM-DD from which notes to fetch - name: end_date in: query type: string description: The date in format of YYYY-MM-DD until which notes to fetch to - name: updated_since in: query type: string description: If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. - name: pinned_to_lead_flag in: query type: number description: If set, the results are filtered by note to lead pinning state - name: pinned_to_deal_flag in: query type: number description: If set, the results are filtered by note to deal pinning state - name: pinned_to_organization_flag in: query type: number description: If set, the results are filtered by note to organization pinning state - name: pinned_to_person_flag in: query type: number description: If set, the results are filtered by note to person pinning state - name: pinned_to_project_flag in: query type: number description: If set, the results are filtered by note to project pinning state - name: pinned_to_task_flag in: query type: number description: If set, the results are filtered by note to task pinning state - name: addnote method: POST description: Add a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: notes-id path: /notes/{id} operations: - name: deletenote method: DELETE description: Delete a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: getnote method: GET description: Get one note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: updatenote method: PUT description: Update a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: body in: body type: object description: Request body (JSON). required: false - name: notes-id-comments path: /notes/{id}/comments operations: - name: getnotecomments method: GET description: Get all comments for a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: start in: query type: integer description: Pagination start - name: limit in: query type: integer description: Items shown per page - name: addnotecomment method: POST description: Add a comment to a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: body in: body type: object description: Request body (JSON). required: false - name: notes-id-comments-commentId path: /notes/{id}/comments/{commentId} operations: - name: getcomment method: GET description: Get one comment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: commentId in: path type: string description: The ID of the comment required: true - name: updatecommentfornote method: PUT description: Update a comment related to a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: commentId in: path type: string description: The ID of the comment required: true - name: body in: body type: object description: Request body (JSON). required: false - name: deletecomment method: DELETE description: Delete a comment related to a note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The ID of the note required: true - name: commentId in: path type: string description: The ID of the comment required: true authentication: type: bearer token: '{{env.PIPEDRIVE_API_KEY}}' exposes: - type: rest namespace: v1-notes-rest port: 8080 description: REST adapter for Pipedrive API v1 — Notes. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/notes name: notes description: REST surface for notes. operations: - method: GET name: getnotes description: Get all notes call: v1-notes.getnotes with: user_id: rest.user_id lead_id: rest.lead_id deal_id: rest.deal_id person_id: rest.person_id org_id: rest.org_id project_id: rest.project_id task_id: rest.task_id start: rest.start limit: rest.limit sort: rest.sort start_date: rest.start_date end_date: rest.end_date updated_since: rest.updated_since pinned_to_lead_flag: rest.pinned_to_lead_flag pinned_to_deal_flag: rest.pinned_to_deal_flag pinned_to_organization_flag: rest.pinned_to_organization_flag pinned_to_person_flag: rest.pinned_to_person_flag pinned_to_project_flag: rest.pinned_to_project_flag pinned_to_task_flag: rest.pinned_to_task_flag outputParameters: - type: object mapping: $. - method: POST name: addnote description: Add a note call: v1-notes.addnote with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/notes/{id} name: notes-id description: REST surface for notes-id. operations: - method: DELETE name: deletenote description: Delete a note call: v1-notes.deletenote with: id: rest.id outputParameters: - type: object mapping: $. - method: GET name: getnote description: Get one note call: v1-notes.getnote with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: updatenote description: Update a note call: v1-notes.updatenote with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/notes/{id}/comments name: notes-id-comments description: REST surface for notes-id-comments. operations: - method: GET name: getnotecomments description: Get all comments for a note call: v1-notes.getnotecomments with: id: rest.id start: rest.start limit: rest.limit outputParameters: - type: object mapping: $. - method: POST name: addnotecomment description: Add a comment to a note call: v1-notes.addnotecomment with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/notes/{id}/comments/{commentid} name: notes-id-comments-commentid description: REST surface for notes-id-comments-commentId. operations: - method: GET name: getcomment description: Get one comment call: v1-notes.getcomment with: id: rest.id commentId: rest.commentId outputParameters: - type: object mapping: $. - method: PUT name: updatecommentfornote description: Update a comment related to a note call: v1-notes.updatecommentfornote with: id: rest.id commentId: rest.commentId body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletecomment description: Delete a comment related to a note call: v1-notes.deletecomment with: id: rest.id commentId: rest.commentId outputParameters: - type: object mapping: $. - type: mcp namespace: v1-notes-mcp port: 9090 transport: http description: MCP adapter for Pipedrive API v1 — Notes. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-all-notes description: Get all notes hints: readOnly: true destructive: false idempotent: true call: v1-notes.getnotes with: user_id: tools.user_id lead_id: tools.lead_id deal_id: tools.deal_id person_id: tools.person_id org_id: tools.org_id project_id: tools.project_id task_id: tools.task_id start: tools.start limit: tools.limit sort: tools.sort start_date: tools.start_date end_date: tools.end_date updated_since: tools.updated_since pinned_to_lead_flag: tools.pinned_to_lead_flag pinned_to_deal_flag: tools.pinned_to_deal_flag pinned_to_organization_flag: tools.pinned_to_organization_flag pinned_to_person_flag: tools.pinned_to_person_flag pinned_to_project_flag: tools.pinned_to_project_flag pinned_to_task_flag: tools.pinned_to_task_flag outputParameters: - type: object mapping: $. - name: add-note description: Add a note hints: readOnly: false destructive: false idempotent: false call: v1-notes.addnote with: body: tools.body outputParameters: - type: object mapping: $. - name: delete-note description: Delete a note hints: readOnly: false destructive: true idempotent: true call: v1-notes.deletenote with: id: tools.id outputParameters: - type: object mapping: $. - name: get-one-note description: Get one note hints: readOnly: true destructive: false idempotent: true call: v1-notes.getnote with: id: tools.id outputParameters: - type: object mapping: $. - name: update-note description: Update a note hints: readOnly: false destructive: false idempotent: true call: v1-notes.updatenote with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: get-all-comments-note description: Get all comments for a note hints: readOnly: true destructive: false idempotent: true call: v1-notes.getnotecomments with: id: tools.id start: tools.start limit: tools.limit outputParameters: - type: object mapping: $. - name: add-comment-note description: Add a comment to a note hints: readOnly: false destructive: false idempotent: false call: v1-notes.addnotecomment with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: get-one-comment description: Get one comment hints: readOnly: true destructive: false idempotent: true call: v1-notes.getcomment with: id: tools.id commentId: tools.commentId outputParameters: - type: object mapping: $. - name: update-comment-related-note description: Update a comment related to a note hints: readOnly: false destructive: false idempotent: true call: v1-notes.updatecommentfornote with: id: tools.id commentId: tools.commentId body: tools.body outputParameters: - type: object mapping: $. - name: delete-comment-related-note description: Delete a comment related to a note hints: readOnly: false destructive: true idempotent: true call: v1-notes.deletecomment with: id: tools.id commentId: tools.commentId outputParameters: - type: object mapping: $.