naftiko: 1.0.0-alpha2 info: label: Dev.to Forem API — Articles description: 'Dev.to Forem API — Articles. 12 operations. Lead operation: Publish article. Self-contained Naftiko capability covering one Dev To business surface.' tags: - Dev To - Articles created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DEV_TO_API_KEY: DEV_TO_API_KEY capability: consumes: - type: http namespace: forem-articles baseUri: https://dev.to/api description: Dev.to Forem API — Articles business capability. Self-contained, no shared references. resources: - name: articles path: /articles operations: - name: createarticle method: POST description: Publish article outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: getarticles method: GET description: Published articles outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: tag in: query type: string description: Filter articles by a single tag name. - name: tags in: query type: string description: Filter articles by a comma-separated list of tag names (articles must have all specified tags). - name: tags_exclude in: query type: string description: Exclude articles with these comma-separated tag names. - name: username in: query type: string description: Filter articles by the author's username. - name: state in: query type: string description: Filter articles by state. Defaults to the most popular articles. - name: top in: query type: integer description: Return the most popular articles published in the last N days. - name: collection_id in: query type: integer description: Return articles belonging to the specified collection. - name: articles-latest path: /articles/latest operations: - name: getlatestarticles method: GET description: Published articles sorted by published date outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-me path: /articles/me operations: - name: getuserarticles method: GET description: User's articles outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-me-all path: /articles/me/all operations: - name: getuserallarticles method: GET description: User's all articles outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-me-published path: /articles/me/published operations: - name: getuserpublishedarticles method: GET description: User's published articles outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-me-unpublished path: /articles/me/unpublished operations: - name: getuserunpublishedarticles method: GET description: User's unpublished articles outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-id path: /articles/{id} operations: - name: getarticlebyid method: GET description: Published article by id outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatearticle method: PUT description: Update an article by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: articles-id-unpublish path: /articles/{id}/unpublish operations: - name: unpublisharticle method: PUT description: Unpublish an article outputRawFormat: json outputParameters: - name: result type: object value: $. - name: articles-username-slug path: /articles/{username}/{slug} operations: - name: getarticlebypath method: GET description: Published article by path outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: username in: path type: string description: The username of the article's author. required: true - name: slug in: path type: string description: The slug of the article. required: true - name: organizations-username-articles path: /organizations/{username}/articles operations: - name: getorgarticles method: GET description: Organization's Articles outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: username in: path type: string description: The username (slug) of the organization. required: true authentication: type: apikey key: api-key value: '{{env.DEV_TO_API_KEY}}' placement: header exposes: - type: rest namespace: forem-articles-rest port: 8080 description: REST adapter for Dev.to Forem API — Articles. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/articles name: articles description: REST surface for articles. operations: - method: POST name: createarticle description: Publish article call: forem-articles.createarticle with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getarticles description: Published articles call: forem-articles.getarticles with: tag: rest.tag tags: rest.tags tags_exclude: rest.tags_exclude username: rest.username state: rest.state top: rest.top collection_id: rest.collection_id outputParameters: - type: object mapping: $. - path: /v1/articles/latest name: articles-latest description: REST surface for articles-latest. operations: - method: GET name: getlatestarticles description: Published articles sorted by published date call: forem-articles.getlatestarticles outputParameters: - type: object mapping: $. - path: /v1/articles/me name: articles-me description: REST surface for articles-me. operations: - method: GET name: getuserarticles description: User's articles call: forem-articles.getuserarticles outputParameters: - type: object mapping: $. - path: /v1/articles/me/all name: articles-me-all description: REST surface for articles-me-all. operations: - method: GET name: getuserallarticles description: User's all articles call: forem-articles.getuserallarticles outputParameters: - type: object mapping: $. - path: /v1/articles/me/published name: articles-me-published description: REST surface for articles-me-published. operations: - method: GET name: getuserpublishedarticles description: User's published articles call: forem-articles.getuserpublishedarticles outputParameters: - type: object mapping: $. - path: /v1/articles/me/unpublished name: articles-me-unpublished description: REST surface for articles-me-unpublished. operations: - method: GET name: getuserunpublishedarticles description: User's unpublished articles call: forem-articles.getuserunpublishedarticles outputParameters: - type: object mapping: $. - path: /v1/articles/{id} name: articles-id description: REST surface for articles-id. operations: - method: GET name: getarticlebyid description: Published article by id call: forem-articles.getarticlebyid outputParameters: - type: object mapping: $. - method: PUT name: updatearticle description: Update an article by id call: forem-articles.updatearticle with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/articles/{id}/unpublish name: articles-id-unpublish description: REST surface for articles-id-unpublish. operations: - method: PUT name: unpublisharticle description: Unpublish an article call: forem-articles.unpublisharticle outputParameters: - type: object mapping: $. - path: /v1/articles/{username}/{slug} name: articles-username-slug description: REST surface for articles-username-slug. operations: - method: GET name: getarticlebypath description: Published article by path call: forem-articles.getarticlebypath with: username: rest.username slug: rest.slug outputParameters: - type: object mapping: $. - path: /v1/organizations/{username}/articles name: organizations-username-articles description: REST surface for organizations-username-articles. operations: - method: GET name: getorgarticles description: Organization's Articles call: forem-articles.getorgarticles with: username: rest.username outputParameters: - type: object mapping: $. - type: mcp namespace: forem-articles-mcp port: 9090 transport: http description: MCP adapter for Dev.to Forem API — Articles. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: publish-article description: Publish article hints: readOnly: false destructive: false idempotent: false call: forem-articles.createarticle with: body: tools.body outputParameters: - type: object mapping: $. - name: published-articles description: Published articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getarticles with: tag: tools.tag tags: tools.tags tags_exclude: tools.tags_exclude username: tools.username state: tools.state top: tools.top collection_id: tools.collection_id outputParameters: - type: object mapping: $. - name: published-articles-sorted-published-date description: Published articles sorted by published date hints: readOnly: true destructive: false idempotent: true call: forem-articles.getlatestarticles outputParameters: - type: object mapping: $. - name: user-s-articles description: User's articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getuserarticles outputParameters: - type: object mapping: $. - name: user-s-all-articles description: User's all articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getuserallarticles outputParameters: - type: object mapping: $. - name: user-s-published-articles description: User's published articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getuserpublishedarticles outputParameters: - type: object mapping: $. - name: user-s-unpublished-articles description: User's unpublished articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getuserunpublishedarticles outputParameters: - type: object mapping: $. - name: published-article-id description: Published article by id hints: readOnly: true destructive: false idempotent: true call: forem-articles.getarticlebyid outputParameters: - type: object mapping: $. - name: update-article-id description: Update an article by id hints: readOnly: false destructive: false idempotent: true call: forem-articles.updatearticle with: body: tools.body outputParameters: - type: object mapping: $. - name: unpublish-article description: Unpublish an article hints: readOnly: false destructive: false idempotent: true call: forem-articles.unpublisharticle outputParameters: - type: object mapping: $. - name: published-article-path description: Published article by path hints: readOnly: true destructive: false idempotent: true call: forem-articles.getarticlebypath with: username: tools.username slug: tools.slug outputParameters: - type: object mapping: $. - name: organization-s-articles description: Organization's Articles hints: readOnly: true destructive: false idempotent: true call: forem-articles.getorgarticles with: username: tools.username outputParameters: - type: object mapping: $.