UNPKG

claudeus-wp-mcp

Version:

The most comprehensive WordPress MCP server - 145 production-ready tools for complete WordPress management with AI

43 lines 1.45 kB
export async function handleMediaTools(name, args, client) { switch (name) { case 'claudeus_wp_media__get_media': { const media = await client.get('/wp/v2/media', args.filters); return { content: [{ type: "text", text: JSON.stringify(media, null, 2) }] }; } case 'claudeus_wp_media__upload': { const media = await client.post('/wp/v2/media', args.data); return { content: [{ type: "text", text: JSON.stringify(media, null, 2) }] }; } case 'claudeus_wp_media__update': { const media = await client.put(`/wp/v2/media/${args.id}`, args.data); return { content: [{ type: "text", text: JSON.stringify(media, null, 2) }] }; } case 'claudeus_wp_media__delete': { await client.delete(`/wp/v2/media/${args.id}`); return { content: [{ type: "text", text: "Media deleted successfully" }] }; } default: throw new Error(`Unknown media tool: ${name}`); } } //# sourceMappingURL=handlers.js.map