get_comments
Pack: jsonplaceholder · Endpoint: https://gateway.pipeworx.io/jsonplaceholder/mcp
Fetch comments for a specific post by post ID (e.g., “1”). Returns comment ID, commenter name, email, and body text.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
post_id | number | yes | Post ID whose comments to retrieve (1–100). |
Example call
Arguments
{
"post_id": 1
}
curl
curl -X POST https://gateway.pipeworx.io/jsonplaceholder/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_comments","arguments":{"post_id":1}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_comments', {
"post_id": 1
});
More examples
{
"post_id": 5
}
Response shape
Always returns: post_id, count, comments
| Field | Type | Description |
|---|---|---|
post_id | number | Post ID the comments belong to |
count | number | Number of comments returned |
comments | array | Array of comments on the post |
Full JSON Schema
{
"type": "object",
"properties": {
"post_id": {
"type": "number",
"description": "Post ID the comments belong to"
},
"count": {
"type": "number",
"description": "Number of comments returned"
},
"comments": {
"type": "array",
"description": "Array of comments on the post",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Comment ID"
},
"name": {
"type": "string",
"description": "Commenter's name"
},
"email": {
"type": "string",
"description": "Commenter's email address"
},
"body": {
"type": "string",
"description": "Comment text"
}
},
"required": [
"id",
"name",
"email",
"body"
]
}
}
},
"required": [
"post_id",
"count",
"comments"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"jsonplaceholder": {
"url": "https://gateway.pipeworx.io/jsonplaceholder/mcp"
}
}
}
See Getting Started for client-specific install steps.