Ollama · Capability

Ollama OpenAI Compatibility API — Models

Ollama OpenAI Compatibility API — Models. 2 operations. Lead operation: Ollama List models. Self-contained Naftiko capability covering one Ollama business surface.

Run with Naftiko OllamaModels

What You Can Do

GET
Listmodels — Ollama List models
/v1/models
GET
Retrievemodel — Ollama Retrieve a model
/v1/models/{model}

MCP Tools

ollama-list-models

Ollama List models

read-only idempotent
ollama-retrieve-model

Ollama Retrieve a model

read-only idempotent

Capability Spec

openai-compatibility-models.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Ollama OpenAI Compatibility API — Models
  description: 'Ollama OpenAI Compatibility API — Models. 2 operations. Lead operation: Ollama List models. Self-contained
    Naftiko capability covering one Ollama business surface.'
  tags:
  - Ollama
  - Models
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OLLAMA_API_KEY: OLLAMA_API_KEY
capability:
  consumes:
  - type: http
    namespace: openai-compatibility-models
    baseUri: http://localhost:11434/v1
    description: Ollama OpenAI Compatibility API — Models business capability. Self-contained, no shared references.
    resources:
    - name: models
      path: /models
      operations:
      - name: listmodels
        method: GET
        description: Ollama List models
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: models-model
      path: /models/{model}
      operations:
      - name: retrievemodel
        method: GET
        description: Ollama Retrieve a model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: model
          in: path
          type: string
          description: The identifier of the model to retrieve.
          required: true
    authentication:
      type: bearer
      token: '{{env.OLLAMA_API_KEY}}'
  exposes:
  - type: rest
    namespace: openai-compatibility-models-rest
    port: 8080
    description: REST adapter for Ollama OpenAI Compatibility API — Models. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/models
      name: models
      description: REST surface for models.
      operations:
      - method: GET
        name: listmodels
        description: Ollama List models
        call: openai-compatibility-models.listmodels
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/models/{model}
      name: models-model
      description: REST surface for models-model.
      operations:
      - method: GET
        name: retrievemodel
        description: Ollama Retrieve a model
        call: openai-compatibility-models.retrievemodel
        with:
          model: rest.model
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: openai-compatibility-models-mcp
    port: 9090
    transport: http
    description: MCP adapter for Ollama OpenAI Compatibility API — Models. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: ollama-list-models
      description: Ollama List models
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openai-compatibility-models.listmodels
      outputParameters:
      - type: object
        mapping: $.
    - name: ollama-retrieve-model
      description: Ollama Retrieve a model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openai-compatibility-models.retrievemodel
      with:
        model: tools.model
      outputParameters:
      - type: object
        mapping: $.