Basetrip · Capability

Basetrip API — Cities

Basetrip API — Cities. 2 operations. Lead operation: Get City. Self-contained Naftiko capability covering one Basetrip business surface.

Run with Naftiko BasetripCities

What You Can Do

GET
Getcity — Get City
/v1/cities/{id}
GET
Listcitiesbycountry — List Cities By Country
/v1/countries/{id}/cities

MCP Tools

get-city

Get City

read-only idempotent
list-cities-country

List Cities By Country

read-only idempotent

Capability Spec

basetrip-cities.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Basetrip API — Cities
  description: 'Basetrip API — Cities. 2 operations. Lead operation: Get City. Self-contained Naftiko capability covering
    one Basetrip business surface.'
  tags:
  - Basetrip
  - Cities
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BASETRIP_API_KEY: BASETRIP_API_KEY
capability:
  consumes:
  - type: http
    namespace: basetrip-cities
    baseUri: https://api.thebasetrip.com/v3
    description: Basetrip API — Cities business capability. Self-contained, no shared references.
    resources:
    - name: cities-id
      path: /cities/{id}
      operations:
      - name: getcity
        method: GET
        description: Get City
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: City slug
          required: true
    - name: countries-id-cities
      path: /countries/{id}/cities
      operations:
      - name: listcitiesbycountry
        method: GET
        description: List Cities By Country
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Country slug or alpha-2 code
          required: true
    authentication:
      type: apikey
      key: X-API-Key
      value: '{{env.BASETRIP_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: basetrip-cities-rest
    port: 8080
    description: REST adapter for Basetrip API — Cities. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/cities/{id}
      name: cities-id
      description: REST surface for cities-id.
      operations:
      - method: GET
        name: getcity
        description: Get City
        call: basetrip-cities.getcity
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/countries/{id}/cities
      name: countries-id-cities
      description: REST surface for countries-id-cities.
      operations:
      - method: GET
        name: listcitiesbycountry
        description: List Cities By Country
        call: basetrip-cities.listcitiesbycountry
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: basetrip-cities-mcp
    port: 9090
    transport: http
    description: MCP adapter for Basetrip API — Cities. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-city
      description: Get City
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: basetrip-cities.getcity
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-cities-country
      description: List Cities By Country
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: basetrip-cities.listcitiesbycountry
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.