Skip to content

FEATURE: add support for post editing#45

Merged
xfalcox merged 2 commits into
mainfrom
feature/update-post-tool
Apr 1, 2026
Merged

FEATURE: add support for post editing#45
xfalcox merged 2 commits into
mainfrom
feature/update-post-tool

Conversation

@xfalcox

@xfalcox xfalcox commented Mar 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Add discourse_update_post tool to edit existing post content via PUT /posts/:post_id.json
  • Supports post_id, raw (markdown content), and optional edit_reason parameters
  • Bump version to 0.2.7

xfalcox and others added 2 commits March 31, 2026 15:37
Add discourse_update_post tool to edit existing post content via
PUT /posts/:post_id.json with optional edit_reason parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines +15 to +24
server.registerTool(
"discourse_update_post",
{
title: "Update Post",
description: "Update the content of an existing post. Returns JSON with updated post details.",
inputSchema: schema.shape,
},
async (args, _extra) => {
try {
const { post_id, raw, edit_reason } = schema.parse(args);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in scope, but more of a general question, would it make sense for registerTool to do the schema.parse before getting in here?

@xfalcox xfalcox merged commit 11f90d7 into main Apr 1, 2026
2 checks passed
@xfalcox xfalcox deleted the feature/update-post-tool branch April 1, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants