Modern Treasury · Capability
Modern Treasury — Counterparty
Modern Treasury — Counterparty. 6 operations. Lead operation: list counterparties. Self-contained Naftiko capability covering one Modern Treasury business surface.
What You Can Do
GET
Listcounterparties
— list counterparties
/v1/api/counterparties
POST
Createcounterparty
— create counterparty
/v1/api/counterparties
GET
Getcounterparty
— show counterparty
/v1/api/counterparties/{id}
PATCH
Updatecounterparty
— update counterparty
/v1/api/counterparties/{id}
DELETE
Deletecounterparty
— delete counterparty
/v1/api/counterparties/{id}
POST
Collectaccountdetails
— collect account details
/v1/api/counterparties/{id}/collect-account
MCP Tools
list-counterparties
list counterparties
read-only
idempotent
create-counterparty
create counterparty
show-counterparty
show counterparty
read-only
idempotent
update-counterparty
update counterparty
idempotent
delete-counterparty
delete counterparty
idempotent
collect-account-details
collect account details
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Modern Treasury — Counterparty
description: 'Modern Treasury — Counterparty. 6 operations. Lead operation: list counterparties. Self-contained Naftiko
capability covering one Modern Treasury business surface.'
tags:
- Modern Treasury
- Counterparty
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
MODERN_TREASURY_API_KEY: MODERN_TREASURY_API_KEY
capability:
consumes:
- type: http
namespace: modern-treasury-counterparty
baseUri: http://localhost:3000
description: Modern Treasury — Counterparty business capability. Self-contained, no shared references.
resources:
- name: api-counterparties
path: /api/counterparties
operations:
- name: listcounterparties
method: GET
description: list counterparties
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: after_cursor
in: query
type: string
- name: per_page
in: query
type: integer
- name: name
in: query
type: string
description: Performs a partial string match of the name field. This is also case insensitive.
- name: email
in: query
type: string
description: Performs a partial string match of the email field. This is also case insensitive.
- name: external_id
in: query
type: string
description: An optional user-defined 180 character unique identifier.
- name: legal_entity_id
in: query
type: string
description: Filters for counterparties with the given legal entity ID.
- name: created_at_lower_bound
in: query
type: string
description: Used to return counterparties created after some datetime.
- name: created_at_upper_bound
in: query
type: string
description: Used to return counterparties created before some datetime.
- name: createcounterparty
method: POST
description: create counterparty
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: Idempotency-Key
in: header
type: string
description: This key should be something unique, preferably something like an UUID.
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: api-counterparties-id
path: /api/counterparties/{id}
operations:
- name: getcounterparty
method: GET
description: show counterparty
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: updatecounterparty
method: PATCH
description: update counterparty
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: deletecounterparty
method: DELETE
description: delete counterparty
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: api-counterparties-id-collect_account
path: /api/counterparties/{id}/collect_account
operations:
- name: collectaccountdetails
method: POST
description: collect account details
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: Idempotency-Key
in: header
type: string
description: This key should be something unique, preferably something like an UUID.
- name: id
in: path
type: string
description: counterparty id
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
authentication:
type: basic
username: '{{env.MODERN_TREASURY_USER}}'
password: '{{env.MODERN_TREASURY_PASS}}'
exposes:
- type: rest
namespace: modern-treasury-counterparty-rest
port: 8080
description: REST adapter for Modern Treasury — Counterparty. One Spectral-compliant resource per consumed operation,
prefixed with /v1.
resources:
- path: /v1/api/counterparties
name: api-counterparties
description: REST surface for api-counterparties.
operations:
- method: GET
name: listcounterparties
description: list counterparties
call: modern-treasury-counterparty.listcounterparties
with:
after_cursor: rest.after_cursor
per_page: rest.per_page
name: rest.name
email: rest.email
external_id: rest.external_id
legal_entity_id: rest.legal_entity_id
created_at_lower_bound: rest.created_at_lower_bound
created_at_upper_bound: rest.created_at_upper_bound
outputParameters:
- type: object
mapping: $.
- method: POST
name: createcounterparty
description: create counterparty
call: modern-treasury-counterparty.createcounterparty
with:
Idempotency-Key: rest.Idempotency-Key
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/counterparties/{id}
name: api-counterparties-id
description: REST surface for api-counterparties-id.
operations:
- method: GET
name: getcounterparty
description: show counterparty
call: modern-treasury-counterparty.getcounterparty
outputParameters:
- type: object
mapping: $.
- method: PATCH
name: updatecounterparty
description: update counterparty
call: modern-treasury-counterparty.updatecounterparty
with:
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: deletecounterparty
description: delete counterparty
call: modern-treasury-counterparty.deletecounterparty
outputParameters:
- type: object
mapping: $.
- path: /v1/api/counterparties/{id}/collect-account
name: api-counterparties-id-collect-account
description: REST surface for api-counterparties-id-collect_account.
operations:
- method: POST
name: collectaccountdetails
description: collect account details
call: modern-treasury-counterparty.collectaccountdetails
with:
Idempotency-Key: rest.Idempotency-Key
id: rest.id
body: rest.body
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: modern-treasury-counterparty-mcp
port: 9090
transport: http
description: MCP adapter for Modern Treasury — Counterparty. One tool per consumed operation, routed inline through this
capability's consumes block.
tools:
- name: list-counterparties
description: list counterparties
hints:
readOnly: true
destructive: false
idempotent: true
call: modern-treasury-counterparty.listcounterparties
with:
after_cursor: tools.after_cursor
per_page: tools.per_page
name: tools.name
email: tools.email
external_id: tools.external_id
legal_entity_id: tools.legal_entity_id
created_at_lower_bound: tools.created_at_lower_bound
created_at_upper_bound: tools.created_at_upper_bound
outputParameters:
- type: object
mapping: $.
- name: create-counterparty
description: create counterparty
hints:
readOnly: false
destructive: false
idempotent: false
call: modern-treasury-counterparty.createcounterparty
with:
Idempotency-Key: tools.Idempotency-Key
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: show-counterparty
description: show counterparty
hints:
readOnly: true
destructive: false
idempotent: true
call: modern-treasury-counterparty.getcounterparty
outputParameters:
- type: object
mapping: $.
- name: update-counterparty
description: update counterparty
hints:
readOnly: false
destructive: false
idempotent: true
call: modern-treasury-counterparty.updatecounterparty
with:
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: delete-counterparty
description: delete counterparty
hints:
readOnly: false
destructive: true
idempotent: true
call: modern-treasury-counterparty.deletecounterparty
outputParameters:
- type: object
mapping: $.
- name: collect-account-details
description: collect account details
hints:
readOnly: false
destructive: false
idempotent: false
call: modern-treasury-counterparty.collectaccountdetails
with:
Idempotency-Key: tools.Idempotency-Key
id: tools.id
body: tools.body
outputParameters:
- type: object
mapping: $.