JSONPlaceholder · Capability
JSONPlaceholder REST API — Posts
Posts — the canonical JSONPlaceholder blog-post surface. 7 operations. Lead operation: List Posts. Self-contained Naftiko capability covering one JSONPlaceholder business surface.
What You Can Do
GET
Listposts
— List all posts.
/v1/posts
POST
Createpost
— Create a new post (simulated).
/v1/posts
GET
Getpost
— Get a single post by id.
/v1/posts/{id}
PUT
Replacepost
— Replace a post in full (simulated).
/v1/posts/{id}
PATCH
Updatepost
— Partially update a post (simulated).
/v1/posts/{id}
DELETE
Deletepost
— Delete a post (simulated).
/v1/posts/{id}
GET
Listpostcomments
— List all comments belonging to a single post.
/v1/posts/{id}/comments
MCP Tools
list-posts
List all posts, optionally filtered by userId or id.
read-only
idempotent
create-post
Create a new post (simulated, not persisted).
get-post
Get a single post by id.
read-only
idempotent
replace-post
Replace a post in full (simulated).
idempotent
update-post
Partially update a post (simulated).
idempotent
delete-post
Delete a post (simulated).
idempotent
list-post-comments
List all comments belonging to a single post.
read-only
idempotent
Capability Spec
naftiko: "1.0.0-alpha2"
info:
label: "JSONPlaceholder REST API — Posts"
description: >-
Posts — the canonical JSONPlaceholder blog-post surface. 7 operations.
Lead operation: List Posts. Self-contained Naftiko capability covering one
JSONPlaceholder business surface.
tags:
- JSONPlaceholder
- Posts
- Fake REST
created: "2026-05-29"
modified: "2026-05-29"
binds:
- namespace: env
keys:
JSONPLACEHOLDER_BASE_URL: JSONPLACEHOLDER_BASE_URL
capability:
consumes:
- type: http
namespace: "jsonplaceholder-posts"
baseUri: "https://jsonplaceholder.typicode.com"
description: "JSONPlaceholder Posts surface. No authentication required."
resources:
- name: "posts"
path: "/posts"
operations:
- name: "listPosts"
method: GET
description: "List all 100 posts; optional query filters."
inputParameters:
- name: "userId"
in: query
type: integer
required: false
description: "Filter posts by owning user id."
- name: "id"
in: query
type: integer
required: false
description: "Filter posts by post id."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "createPost"
method: POST
description: "Create a new post (simulated, not persisted)."
inputParameters:
- name: "body"
in: body
type: object
required: true
description: "Post payload (title, body, userId)."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "post"
path: "/posts/{id}"
operations:
- name: "getPost"
method: GET
description: "Get a single post by id."
inputParameters:
- name: "id"
in: path
type: integer
required: true
description: "Post identifier (1-100)."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "replacePost"
method: PUT
description: "Replace a post in full (simulated)."
inputParameters:
- name: "id"
in: path
type: integer
required: true
description: "Post identifier."
- name: "body"
in: body
type: object
required: true
description: "Full replacement payload."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "updatePost"
method: PATCH
description: "Partially update a post (simulated)."
inputParameters:
- name: "id"
in: path
type: integer
required: true
description: "Post identifier."
- name: "body"
in: body
type: object
required: true
description: "Partial update payload."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "deletePost"
method: DELETE
description: "Delete a post (simulated)."
inputParameters:
- name: "id"
in: path
type: integer
required: true
description: "Post identifier."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
- name: "post-comments"
path: "/posts/{id}/comments"
operations:
- name: "listPostComments"
method: GET
description: "List all comments belonging to a single post."
inputParameters:
- name: "id"
in: path
type: integer
required: true
description: "Post identifier."
outputRawFormat: json
outputParameters:
- name: result
type: object
value: "$."
exposes:
- type: rest
namespace: "jsonplaceholder-posts-rest"
port: 8080
description: "REST adapter for JSONPlaceholder Posts. One resource per consumed operation, prefixed with /v1."
resources:
- path: "/v1/posts"
name: "posts"
description: "List and create posts."
operations:
- method: GET
name: "listPosts"
description: "List all posts."
call: "jsonplaceholder-posts.listPosts"
with:
"userId": "rest.userId"
"id": "rest.id"
outputParameters:
- type: object
mapping: "$."
- method: POST
name: "createPost"
description: "Create a new post (simulated)."
call: "jsonplaceholder-posts.createPost"
with:
"body": "rest.body"
outputParameters:
- type: object
mapping: "$."
- path: "/v1/posts/{id}"
name: "post"
description: "Read, replace, update, or delete a single post."
operations:
- method: GET
name: "getPost"
description: "Get a single post by id."
call: "jsonplaceholder-posts.getPost"
with:
"id": "rest.id"
outputParameters:
- type: object
mapping: "$."
- method: PUT
name: "replacePost"
description: "Replace a post in full (simulated)."
call: "jsonplaceholder-posts.replacePost"
with:
"id": "rest.id"
"body": "rest.body"
outputParameters:
- type: object
mapping: "$."
- method: PATCH
name: "updatePost"
description: "Partially update a post (simulated)."
call: "jsonplaceholder-posts.updatePost"
with:
"id": "rest.id"
"body": "rest.body"
outputParameters:
- type: object
mapping: "$."
- method: DELETE
name: "deletePost"
description: "Delete a post (simulated)."
call: "jsonplaceholder-posts.deletePost"
with:
"id": "rest.id"
outputParameters:
- type: object
mapping: "$."
- path: "/v1/posts/{id}/comments"
name: "post-comments"
description: "List comments for a single post."
operations:
- method: GET
name: "listPostComments"
description: "List all comments belonging to a single post."
call: "jsonplaceholder-posts.listPostComments"
with:
"id": "rest.id"
outputParameters:
- type: object
mapping: "$."
- type: mcp
namespace: "jsonplaceholder-posts-mcp"
port: 9090
transport: http
description: "MCP adapter for JSONPlaceholder Posts. One verb-noun tool per consumed operation."
tools:
- name: "list-posts"
description: "List all posts, optionally filtered by userId or id."
hints:
readOnly: true
destructive: false
idempotent: true
call: "jsonplaceholder-posts.listPosts"
with:
"userId": "tools.userId"
"id": "tools.id"
outputParameters:
- type: object
mapping: "$."
- name: "create-post"
description: "Create a new post (simulated, not persisted)."
hints:
readOnly: false
destructive: false
idempotent: false
call: "jsonplaceholder-posts.createPost"
with:
"body": "tools.body"
outputParameters:
- type: object
mapping: "$."
- name: "get-post"
description: "Get a single post by id."
hints:
readOnly: true
destructive: false
idempotent: true
call: "jsonplaceholder-posts.getPost"
with:
"id": "tools.id"
outputParameters:
- type: object
mapping: "$."
- name: "replace-post"
description: "Replace a post in full (simulated)."
hints:
readOnly: false
destructive: false
idempotent: true
call: "jsonplaceholder-posts.replacePost"
with:
"id": "tools.id"
"body": "tools.body"
outputParameters:
- type: object
mapping: "$."
- name: "update-post"
description: "Partially update a post (simulated)."
hints:
readOnly: false
destructive: false
idempotent: true
call: "jsonplaceholder-posts.updatePost"
with:
"id": "tools.id"
"body": "tools.body"
outputParameters:
- type: object
mapping: "$."
- name: "delete-post"
description: "Delete a post (simulated)."
hints:
readOnly: false
destructive: true
idempotent: true
call: "jsonplaceholder-posts.deletePost"
with:
"id": "tools.id"
outputParameters:
- type: object
mapping: "$."
- name: "list-post-comments"
description: "List all comments belonging to a single post."
hints:
readOnly: true
destructive: false
idempotent: true
call: "jsonplaceholder-posts.listPostComments"
with:
"id": "tools.id"
outputParameters:
- type: object
mapping: "$."