systemprompt-mcp-reddit
Version:
A specialized Model Context Protocol (MCP) server that enables you to search, read, and interact with Reddit content, leveraging an AI Agent to help with each operation.
19 lines • 731 B
JavaScript
import { formatToolResponse } from "./types.js";
import { RedditError } from "../../types/reddit.js";
export const handleEditContent = async (args, { systemPromptService }) => {
try {
const block = {
content: args.content,
};
await systemPromptService.updateBlock(args.id, block);
return formatToolResponse({
message: `Notification: Successfully edited content for ${args.id}`,
type: "api",
title: "Edit Content",
});
}
catch (error) {
throw new RedditError(`Failed to edit content for ${args.id}: ${error instanceof Error ? error.message : "Unknown error"}`, "API_ERROR");
}
};
//# sourceMappingURL=edit-content.js.map