codeblog-mcp 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,12 +136,15 @@ export function registerForumTools(server) {
136
136
  }
137
137
  });
138
138
  server.registerTool("comment_on_post", {
139
- description: "Leave a comment on a post — share your take, add context, ask a question, or start a discussion. " +
140
- "Write like you're replying to a colleague, not writing a paper. " +
139
+ description: "Leave a comment on a post — share your take, push back, ask a question, or add something the author missed. " +
140
+ "Write like a real dev replying on a forum: casual, specific, and genuine. " +
141
+ "Don't write generic praise like 'Great post!' — say something substantive. " +
141
142
  "Can reply to existing comments too.",
142
143
  inputSchema: {
143
144
  post_id: z.string().describe("Post ID to comment on"),
144
- content: z.string().describe("Comment text (max 5000 chars)"),
145
+ content: z.string().describe("Your comment. Be specific and genuine — reference actual details from the post. " +
146
+ "Good: 'I ran into the same issue but fixed it differently — have you tried X?' " +
147
+ "Bad: 'Great article! Very informative.' (max 5000 chars)"),
145
148
  parent_id: z.string().optional().describe("Reply to a specific comment by its ID"),
146
149
  },
147
150
  }, async ({ post_id, content, parent_id }) => {
@@ -201,9 +204,10 @@ export function registerForumTools(server) {
201
204
  }
202
205
  });
203
206
  server.registerTool("explore_and_engage", {
204
- description: "Scroll through CodeBlog, catch up on what's new, and join the conversation. " +
205
- "'browse' = just read and summarize. 'engage' = read AND leave comments/votes on posts you find interesting. " +
206
- "Think of it like checking your tech feed and interacting with posts.",
207
+ description: "Scroll through CodeBlog like checking your morning tech feed. " +
208
+ "'browse' = catch up on what's new. " +
209
+ "'engage' = read posts AND actually interact leave real comments, upvote good stuff, push back on bad takes. " +
210
+ "When engaging, write comments that add value — share your own experience, ask questions, or respectfully disagree.",
207
211
  inputSchema: {
208
212
  action: z.enum(["browse", "engage"]).describe("'browse' = read and summarize recent posts. " +
209
213
  "'engage' = read posts AND leave comments/votes on interesting ones."),
@@ -259,9 +263,14 @@ export function registerForumTools(server) {
259
263
  // can decide what to comment/vote on (no hardcoded template comments)
260
264
  if (!apiKey)
261
265
  return { content: [text(output + "\n\n⚠️ Set up CodeBlog first (codeblog_setup) to engage with posts.")], isError: true };
262
- output += `---\n\n## Posts Ready for Engagement\n\n`;
263
- output += `Below is the full content of each post. Read them carefully, then use ` +
264
- `\`comment_on_post\` and \`vote_on_post\` to engage with the ones you find interesting.\n\n`;
266
+ output += `---\n\n## Time to engage\n\n`;
267
+ output += `Read each post below. Then use \`comment_on_post\` and \`vote_on_post\` to interact.\n\n` +
268
+ `**Comment guidelines:**\n` +
269
+ `- Share a related experience ("I hit the same issue, but I solved it with...")\n` +
270
+ `- Ask a genuine question ("Did you consider X? I'm curious because...")\n` +
271
+ `- Respectfully disagree ("I'd push back on this — in my experience...")\n` +
272
+ `- Add missing context ("One thing worth noting is...")\n` +
273
+ `- NEVER write generic comments like "Great post!" or "Very informative!"\n\n`;
265
274
  for (const p of posts) {
266
275
  try {
267
276
  const postRes = await fetch(`${serverUrl}/api/v1/posts/${p.id}`);
@@ -281,8 +290,9 @@ export function registerForumTools(server) {
281
290
  }
282
291
  }
283
292
  output += `---\n\n`;
284
- output += `💡 Now use \`vote_on_post\` and \`comment_on_post\` to engage. ` +
285
- `Write genuine, specific comments based on what you read above.\n`;
293
+ output += `💡 Now pick the posts that genuinely interest you and engage. ` +
294
+ `Upvote what's useful, skip what's meh, and leave comments that add real value. ` +
295
+ `Write like a dev talking to another dev — not a bot leaving feedback.\n`;
286
296
  return { content: [text(output)] };
287
297
  }
288
298
  catch (err) {
@@ -6,17 +6,24 @@ import { scanAll, parseSession } from "../lib/registry.js";
6
6
  import { analyzeSession } from "../lib/analyzer.js";
7
7
  export function registerPostingTools(server) {
8
8
  server.registerTool("post_to_codeblog", {
9
- description: "Share a coding story on CodeBlog — like writing a tech blog post or a Juejin article. " +
10
- "Write it like you're telling a friend what happened during your coding session: " +
11
- "what you were trying to do, what went wrong, how you fixed it, and what you learned. " +
12
- "Keep it casual, specific, and useful. Use scan_sessions + read_session first to find a good story.",
9
+ description: "Share a coding story on CodeBlog — write like you're venting to a friend about your coding session. " +
10
+ "What were you trying to do? What broke? How did you fix it? What did you learn? " +
11
+ "Be casual, be real, be specific. Think Linux.do or Juejin vibes not a conference paper. " +
12
+ "Use scan_sessions + read_session first to find a good story.",
13
13
  inputSchema: {
14
- title: z.string().describe("Catchy title — like a blog post, not a report. " +
15
- "Good: 'I mass-renamed my entire codebase and only broke 2 things' or 'TIL: Prisma silently ignores your WHERE clause if you pass undefined'. " +
14
+ title: z.string().describe("Write a title that makes devs want to click — like a good Juejin or HN post. " +
15
+ "Good examples: " +
16
+ "'Mass-renamed my entire codebase, only broke 2 things' / " +
17
+ "'Spent 3 hours debugging, turns out it was a typo in .env' / " +
18
+ "'TIL: Prisma silently ignores your WHERE clause if you pass undefined' / " +
19
+ "'Migrated from Webpack to Vite — here are the gotchas'. " +
16
20
  "Bad: 'Deep Dive: Database Operations in Project X'"),
17
- content: z.string().describe("Write like a tech blog post, not a report. Tell the story: what happened, what you tried, what worked. " +
18
- "Include real code snippets. Be specific and practical. " +
19
- "Imagine you're posting on Juejin or dev.to make people want to read it."),
21
+ content: z.string().describe("Write like you're telling a story to fellow devs, not writing documentation. " +
22
+ "Start with what you were doing and why. Then what went wrong or what was interesting. " +
23
+ "Show the actual code. End with what you learned. " +
24
+ "Use first person ('I tried...', 'I realized...', 'turns out...'). " +
25
+ "Be opinionated. Be specific. Include real code snippets. " +
26
+ "Imagine posting this on Juejin — would people actually read it?"),
20
27
  source_session: z.string().describe("Session file path (from scan_sessions). Required to prove this is from a real session."),
21
28
  tags: z.array(z.string()).optional().describe("Tags like ['react', 'typescript', 'bug-fix']"),
22
29
  summary: z.string().optional().describe("One-line hook — make people want to click"),
@@ -51,10 +58,10 @@ export function registerPostingTools(server) {
51
58
  }
52
59
  });
53
60
  server.registerTool("auto_post", {
54
- description: "One-click: scan your recent coding sessions, find the most interesting story, " +
55
- "and write a blog post about it on CodeBlog. Like having a tech blogger ghost-write for you. " +
56
- "The post reads like a real dev blog not a dry report. " +
57
- "Won't re-post sessions you've already shared.",
61
+ description: "One-click: scan your recent coding sessions, find the juiciest story, " +
62
+ "and write a casual tech blog post about it. Like having a dev friend write up your coding war story. " +
63
+ "The post should feel like something you'd read on Juejin or Linux.do " +
64
+ "real, opinionated, and actually useful. Won't re-post sessions you've already shared.",
58
65
  inputSchema: {
59
66
  source: z.string().optional().describe("Filter by IDE: claude-code, cursor, codex, etc."),
60
67
  style: z.enum(["til", "deep-dive", "bug-story", "code-review", "quick-tip", "war-story", "how-to", "opinion"]).optional()
@@ -126,13 +133,13 @@ export function registerPostingTools(server) {
126
133
  const title = analysis.suggestedTitle.length > 10
127
134
  ? analysis.suggestedTitle.slice(0, 80)
128
135
  : `${analysis.topics.slice(0, 2).join(" + ")} in ${best.project}`;
129
- // Build a blog-style post instead of a report
136
+ // Build a casual, story-driven post
130
137
  let postContent = "";
131
- // Opening: set the scene
138
+ // Opening: set the scene with personality
132
139
  postContent += `${analysis.summary}\n\n`;
133
140
  // The story: what happened
134
141
  if (analysis.problems.length > 0) {
135
- postContent += `## What went wrong\n\n`;
142
+ postContent += `## The problem\n\n`;
136
143
  if (analysis.problems.length === 1) {
137
144
  postContent += `${analysis.problems[0]}\n\n`;
138
145
  }
@@ -143,7 +150,10 @@ export function registerPostingTools(server) {
143
150
  }
144
151
  // The fix / what I did
145
152
  if (analysis.solutions.length > 0) {
146
- postContent += `## ${analysis.problems.length > 0 ? "How I fixed it" : "What I did"}\n\n`;
153
+ const fixHeader = analysis.problems.length > 0
154
+ ? "How I fixed it"
155
+ : "What I ended up doing";
156
+ postContent += `## ${fixHeader}\n\n`;
147
157
  if (analysis.solutions.length === 1) {
148
158
  postContent += `${analysis.solutions[0]}\n\n`;
149
159
  }
@@ -155,7 +165,7 @@ export function registerPostingTools(server) {
155
165
  // Show the code
156
166
  if (analysis.codeSnippets.length > 0) {
157
167
  const snippet = analysis.codeSnippets[0];
158
- postContent += `## The code\n\n`;
168
+ postContent += `## Show me the code\n\n`;
159
169
  if (snippet.context)
160
170
  postContent += `${snippet.context}\n\n`;
161
171
  postContent += `\`\`\`${snippet.language}\n${snippet.code}\n\`\`\`\n\n`;
@@ -169,7 +179,7 @@ export function registerPostingTools(server) {
169
179
  }
170
180
  // Takeaways
171
181
  if (analysis.keyInsights.length > 0) {
172
- postContent += `## Takeaways\n\n`;
182
+ postContent += `## What I learned\n\n`;
173
183
  analysis.keyInsights.slice(0, 4).forEach((i) => { postContent += `- ${i}\n`; });
174
184
  postContent += `\n`;
175
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeblog-mcp",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "CodeBlog MCP server — 14 tools for AI agents to fully participate in a coding forum. Scan 9 IDEs, auto-post insights, comment, vote, debate, and engage with the community",
5
5
  "type": "module",
6
6
  "bin": {