naftiko: 1.0.0-alpha2 info: label: Upwork GraphQL API — Contracts description: 'Upwork GraphQL API — Contracts. 3 operations. Lead operation: Upwork List Contracts. Self-contained Naftiko capability covering one Upwork business surface.' tags: - Upwork - Contracts created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: UPWORK_API_KEY: UPWORK_API_KEY capability: consumes: - type: http namespace: graphql-contracts baseUri: https://api.upwork.com description: Upwork GraphQL API — Contracts business capability. Self-contained, no shared references. resources: - name: api-v3-hr-v2-contracts path: /api/v3/hr/v2/contracts operations: - name: listcontracts method: GET description: Upwork List Contracts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: status in: query type: string description: Filter by contract status - name: buyer_team__reference in: query type: string description: Filter by buyer team reference ID - name: paging in: query type: string description: Pagination as offset;count - name: api-v3-hr-v2-contracts-contract_id path: /api/v3/hr/v2/contracts/{contract_id} operations: - name: getcontract method: GET description: Upwork Get Contract Details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: contract_id in: path type: string description: The unique identifier of the contract required: true - name: graphql path: /graphql operations: - name: executegraphql method: POST description: Upwork Execute GraphQL Query or Mutation 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.UPWORK_API_KEY}}' exposes: - type: rest namespace: graphql-contracts-rest port: 8080 description: REST adapter for Upwork GraphQL API — Contracts. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v3/hr/v2/contracts name: api-v3-hr-v2-contracts description: REST surface for api-v3-hr-v2-contracts. operations: - method: GET name: listcontracts description: Upwork List Contracts call: graphql-contracts.listcontracts with: status: rest.status buyer_team__reference: rest.buyer_team__reference paging: rest.paging outputParameters: - type: object mapping: $. - path: /v1/api/v3/hr/v2/contracts/{contract-id} name: api-v3-hr-v2-contracts-contract-id description: REST surface for api-v3-hr-v2-contracts-contract_id. operations: - method: GET name: getcontract description: Upwork Get Contract Details call: graphql-contracts.getcontract with: contract_id: rest.contract_id outputParameters: - type: object mapping: $. - path: /v1/graphql name: graphql description: REST surface for graphql. operations: - method: POST name: executegraphql description: Upwork Execute GraphQL Query or Mutation call: graphql-contracts.executegraphql with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: graphql-contracts-mcp port: 9090 transport: http description: MCP adapter for Upwork GraphQL API — Contracts. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: upwork-list-contracts description: Upwork List Contracts hints: readOnly: true destructive: false idempotent: true call: graphql-contracts.listcontracts with: status: tools.status buyer_team__reference: tools.buyer_team__reference paging: tools.paging outputParameters: - type: object mapping: $. - name: upwork-get-contract-details description: Upwork Get Contract Details hints: readOnly: true destructive: false idempotent: true call: graphql-contracts.getcontract with: contract_id: tools.contract_id outputParameters: - type: object mapping: $. - name: upwork-execute-graphql-query-mutation description: Upwork Execute GraphQL Query or Mutation hints: readOnly: true destructive: false idempotent: false call: graphql-contracts.executegraphql with: body: tools.body outputParameters: - type: object mapping: $.