crates.io · Capability

crates.io Web API — Versions

crates.io Web API — Versions. Self-contained Naftiko capability for inspecting, yanking, and unyanking specific crate versions.

crates.io Web API — Versions is a Naftiko capability published by crates.io, one of 4 capabilities the APIs.io network indexes for this provider. It bundles 2 operations across the GET and DELETE methods rooted at /v1/api/v1/crates/{…}/{…}.

The capability includes 1 read-only operation and 1 state-changing operation. Lead operation: Get Crate Version. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Cratesio, Versions, and Rust.

Run with Naftiko CratesioVersionsRust

What You Can Do

GET
Getversion — Get Crate Version
/v1/api/v1/crates/{crate}/{version}
DELETE
Yankversion — Yank A Crate Version
/v1/api/v1/crates/{crate}/{version}/yank

MCP Tools

crates-get-version

Get Crate Version

read-only idempotent
crates-yank-version

Yank A Crate Version

idempotent

Capability Spec

web-api-versions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: crates.io Web API — Versions
  description: 'crates.io Web API — Versions. Self-contained Naftiko capability for inspecting, yanking, and unyanking specific crate versions.'
  tags:
  - Cratesio
  - Versions
  - Rust
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    CRATES_IO_TOKEN: CRATES_IO_TOKEN
capability:
  consumes:
  - type: http
    namespace: crates-versions
    baseUri: https://crates.io
    description: crates.io Versions business capability.
    resources:
    - name: api-v1-crates-version
      path: /api/v1/crates/{crate}/{version}
      operations:
      - name: getversion
        method: GET
        description: Get Crate Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: crate
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    - name: api-v1-crates-version-yank
      path: /api/v1/crates/{crate}/{version}/yank
      operations:
      - name: yankversion
        method: DELETE
        description: Yank A Crate Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: crate
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    - name: api-v1-crates-version-unyank
      path: /api/v1/crates/{crate}/{version}/unyank
      operations:
      - name: unyankversion
        method: PUT
        description: Unyank A Crate Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: crate
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.CRATES_IO_TOKEN}}'
      placement: header
  exposes:
  - type: rest
    namespace: crates-versions-rest
    port: 8080
    description: REST adapter for crates.io Versions.
    resources:
    - path: /v1/api/v1/crates/{crate}/{version}
      name: get-version
      description: REST surface for version detail.
      operations:
      - method: GET
        name: getversion
        description: Get Crate Version
        call: crates-versions.getversion
        with:
          crate: rest.path.crate
          version: rest.path.version
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/crates/{crate}/{version}/yank
      name: yank-version
      description: REST surface for yank.
      operations:
      - method: DELETE
        name: yankversion
        description: Yank A Crate Version
        call: crates-versions.yankversion
        with:
          crate: rest.path.crate
          version: rest.path.version
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: crates-versions-mcp
    port: 9090
    transport: http
    description: MCP adapter for crates.io Versions.
    tools:
    - name: crates-get-version
      description: Get Crate Version
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crates-versions.getversion
      with:
        crate: tools.crate
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.
    - name: crates-yank-version
      description: Yank A Crate Version
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: crates-versions.yankversion
      with:
        crate: tools.crate
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.