An API of Ice And Fire · Capability

An API of Ice And Fire — Characters

Characters — the protagonists, sworn members, lords, and POV figures of the A Song of Ice and Fire universe. 2 operations. Lead operation: An API of Ice And Fire List Characters. Self-contained Naftiko capability covering one An API of Ice And Fire business surface.

Run with Naftiko An API of Ice And FireCharactersA Song of Ice and Fire

What You Can Do

GET
Listcharacters — List Characters with optional filters.
/v1/characters
GET
Getcharacter — Get Character by ID.
/v1/characters/{id}

MCP Tools

list-characters

List Characters with filters by name, gender, culture, born, died, and isAlive.

read-only idempotent
get-character

Get a specific character by their numeric ID.

read-only idempotent

Capability Spec

an-api-of-ice-and-fire-characters.yaml Raw ↑
naftiko: "1.0.0-alpha2"

info:
  label: "An API of Ice And Fire — Characters"
  description: >-
    Characters — the protagonists, sworn members, lords, and POV figures of
    the A Song of Ice and Fire universe. 2 operations. Lead operation: An API
    of Ice And Fire List Characters. Self-contained Naftiko capability covering
    one An API of Ice And Fire business surface.
  tags:
    - An API of Ice And Fire
    - Characters
    - A Song of Ice and Fire
  created: "2026-05-30"
  modified: "2026-05-30"

binds:
  - namespace: env
    keys: {}

capability:

  consumes:
    - type: http
      namespace: "an-api-of-ice-and-fire-characters"
      baseUri: "https://anapioficeandfire.com/api"
      description: >-
        An API of Ice And Fire — Characters business capability.
        Self-contained, no shared references. No authentication required;
        rate-limited to 20,000 requests per IP per day.
      resources:
        - name: "characters"
          path: "/characters"
          operations:
            - name: "listCharacters"
              method: GET
              description: "List Characters with optional filters by name, gender, culture, born, died, and isAlive."
              inputParameters:
                - name: "page"
                  in: query
                  type: integer
                  required: false
                  description: "Page number (1-indexed)."
                - name: "pageSize"
                  in: query
                  type: integer
                  required: false
                  description: "Items per page (default 10, max 50)."
                - name: "name"
                  in: query
                  type: string
                  required: false
                  description: "Filter characters by name."
                - name: "gender"
                  in: query
                  type: string
                  required: false
                  description: "Filter characters by gender."
                - name: "culture"
                  in: query
                  type: string
                  required: false
                  description: "Filter characters by culture."
                - name: "born"
                  in: query
                  type: string
                  required: false
                  description: "Filter characters by birth year (free-text)."
                - name: "died"
                  in: query
                  type: string
                  required: false
                  description: "Filter characters by death year (free-text)."
                - name: "isAlive"
                  in: query
                  type: boolean
                  required: false
                  description: "Filter to only living or only dead characters."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "characters-by-id"
          path: "/characters/{id}"
          operations:
            - name: "getCharacter"
              method: GET
              description: "Get Character by ID with full hypermedia allegiance, book, and POV-book references."
              inputParameters:
                - name: "id"
                  in: path
                  type: integer
                  required: true
                  description: "Numeric character identifier."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."

  exposes:
    - type: rest
      namespace: "an-api-of-ice-and-fire-characters-rest"
      port: 8080
      description: >-
        REST adapter for An API of Ice And Fire — Characters. One
        Spectral-compliant resource per consumed operation, prefixed with /v1.
      resources:
        - path: "/v1/characters"
          name: "characters"
          description: "REST surface for the characters collection."
          operations:
            - method: GET
              name: "listCharacters"
              description: "List Characters with optional filters."
              call: "an-api-of-ice-and-fire-characters.listCharacters"
              with:
                page: "rest.page"
                pageSize: "rest.pageSize"
                name: "rest.name"
                gender: "rest.gender"
                culture: "rest.culture"
                born: "rest.born"
                died: "rest.died"
                isAlive: "rest.isAlive"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: "/v1/characters/{id}"
          name: "characters-by-id"
          description: "REST surface for retrieving a single character by ID."
          operations:
            - method: GET
              name: "getCharacter"
              description: "Get Character by ID."
              call: "an-api-of-ice-and-fire-characters.getCharacter"
              with:
                id: "rest.id"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      namespace: "an-api-of-ice-and-fire-characters-mcp"
      port: 9090
      transport: http
      description: >-
        MCP adapter for An API of Ice And Fire — Characters. One verb-noun
        tool per consumed operation, routed through this capability's consumes
        block.
      tools:
        - name: "list-characters"
          description: "List Characters with filters by name, gender, culture, born, died, and isAlive."
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: "an-api-of-ice-and-fire-characters.listCharacters"
          with:
            page: "tools.page"
            pageSize: "tools.pageSize"
            name: "tools.name"
            gender: "tools.gender"
            culture: "tools.culture"
            born: "tools.born"
            died: "tools.died"
            isAlive: "tools.isAlive"
          outputParameters:
            - type: object
              mapping: "$."
        - name: "get-character"
          description: "Get a specific character by their numeric ID."
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: "an-api-of-ice-and-fire-characters.getCharacter"
          with:
            id: "tools.id"
          outputParameters:
            - type: object
              mapping: "$."