CodeProject · Capability

CodeProject REST API — Articles

CodeProject REST API — Articles. 2 operations. Lead operation: List the latest articles. Self-contained Naftiko capability covering one Codeproject business surface.

Run with Naftiko CodeprojectArticles

What You Can Do

GET
Listarticles — List the latest articles
/v1/v1/articles
GET
Getarticle — Get a single article
/v1/v1/articles/{id}

MCP Tools

list-latest-articles

List the latest articles

read-only idempotent
get-single-article

Get a single article

read-only idempotent

Capability Spec

rest-articles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CodeProject REST API — Articles
  description: 'CodeProject REST API — Articles. 2 operations. Lead operation: List the latest articles. Self-contained Naftiko
    capability covering one Codeproject business surface.'
  tags:
  - Codeproject
  - Articles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CODEPROJECT_API_KEY: CODEPROJECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-articles
    baseUri: https://api.codeproject.com
    description: CodeProject REST API — Articles business capability. Self-contained, no shared references.
    resources:
    - name: v1-Articles
      path: /v1/Articles
      operations:
      - name: listarticles
        method: GET
        description: List the latest articles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
        - name: minRating
          in: query
          type: number
    - name: v1-Articles-id
      path: /v1/Articles/{id}
      operations:
      - name: getarticle
        method: GET
        description: Get a single article
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
    authentication:
      type: bearer
      token: '{{env.CODEPROJECT_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-articles-rest
    port: 8080
    description: REST adapter for CodeProject REST API — Articles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/articles
      name: v1-articles
      description: REST surface for v1-Articles.
      operations:
      - method: GET
        name: listarticles
        description: List the latest articles
        call: rest-articles.listarticles
        with:
          page: rest.page
          minRating: rest.minRating
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/articles/{id}
      name: v1-articles-id
      description: REST surface for v1-Articles-id.
      operations:
      - method: GET
        name: getarticle
        description: Get a single article
        call: rest-articles.getarticle
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-articles-mcp
    port: 9090
    transport: http
    description: MCP adapter for CodeProject REST API — Articles. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-latest-articles
      description: List the latest articles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-articles.listarticles
      with:
        page: tools.page
        minRating: tools.minRating
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-article
      description: Get a single article
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-articles.getarticle
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.