Moonshot AI · Capability

Moonshot AI API — Utilities

Moonshot AI API — Utilities. 1 operations. Lead operation: Estimate Token Count. Self-contained Naftiko capability covering one Moonshot Ai business surface.

Run with Naftiko Moonshot AiUtilities

What You Can Do

POST
Post — Estimate Token Count
/v1/v1/tokenizers/estimate-token-count

MCP Tools

estimate-token-count

Estimate Token Count

Capability Spec

moonshot-ai-utilities.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Moonshot AI API — Utilities
  description: 'Moonshot AI API — Utilities. 1 operations. Lead operation: Estimate Token Count. Self-contained Naftiko capability
    covering one Moonshot Ai business surface.'
  tags:
  - Moonshot Ai
  - Utilities
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MOONSHOT_AI_API_KEY: MOONSHOT_AI_API_KEY
capability:
  consumes:
  - type: http
    namespace: moonshot-ai-utilities
    baseUri: https://api.moonshot.ai
    description: Moonshot AI API — Utilities business capability. Self-contained, no shared references.
    resources:
    - name: v1-tokenizers-estimate-token-count
      path: /v1/tokenizers/estimate-token-count
      operations:
      - name: post
        method: POST
        description: Estimate Token Count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.MOONSHOT_AI_API_KEY}}'
  exposes:
  - type: rest
    namespace: moonshot-ai-utilities-rest
    port: 8080
    description: REST adapter for Moonshot AI API — Utilities. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/tokenizers/estimate-token-count
      name: v1-tokenizers-estimate-token-count
      description: REST surface for v1-tokenizers-estimate-token-count.
      operations:
      - method: POST
        name: post
        description: Estimate Token Count
        call: moonshot-ai-utilities.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: moonshot-ai-utilities-mcp
    port: 9090
    transport: http
    description: MCP adapter for Moonshot AI API — Utilities. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: estimate-token-count
      description: Estimate Token Count
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: moonshot-ai-utilities.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.