MCP / AI
GenAI MCP Tools

GenAI MCP Tools

Two tools give an AI client (Claude Desktop, Claude Code, or any MCP-speaking assistant) the ability to generate and rewrite LinkedIn posts via Amazon Bedrock. There is no MCP proofreading tool — that's HTTP-API and web-UI only.

⚠️

These tools are not thin wrappers over the GenAI REST API — they're a separate implementation that talks to DynamoDB and Bedrock directly, and critically, they persist changes. generate_post creates a new draft post immediately; iterate_post overwrites a post's content immediately. Neither has a "preview first" step like the web UI's canvas does. This page is based on specs/mcp/genai.md in the repo — see that spec for exact DynamoDB access patterns and Bedrock call shapes.

Access model

Both tools resolve the caller's identity via the MCP auth middleware and enforce workspace membership the same way the REST API does — a direct DynamoDB lookup on WS#{workspace_id} / MEMBER#{user_id}. If the authenticated MCP user isn't a member, the tool raises and the client sees a tool error, not an empty result.

Both tools call Bedrock's Converse API with a fixed maxTokens: 1024, temperature: 0.7 — there's no way to override token budget or temperature per call, unlike the REST API which defaults to max_tokens: 4096.

Tools

ToolParametersPersists?
generate_postidea_id, workspace_id, prompt_id?Creates a new Post item
iterate_postpost_id, workspace_id, instructionOverwrites the post's content in place

generate_post

generate_post(idea_id: str, workspace_id: str, prompt_id: str = "") -> str

Fetches the idea's title/description, resolves a system prompt, pulls in up to 5 example posts (unranked — just the first 5 DynamoDB returns, no tag-overlap scoring like the REST API), calls Bedrock, and immediately saves the result as a new draft post.

Prompt resolution:

  • No prompt_id → a built-in default persona (distinct wording from the REST API's default — "You are a professional LinkedIn content writer...").
  • prompt_id given and found → uses that prompt's content field verbatim.
  • prompt_id given but not found → raises (functionally the MCP equivalent of the REST API's 404 "Prompt not found").
{ "post_id": "post_abc", "content": "Generated draft text...", "status": "draft" }

The new post is written with status: "draft", created_by set to the calling user, and both created_at/updated_at set to now — it shows up on the pipeline board exactly like a manually-created post.

Errors: raises if the caller isn't a workspace member; raises if the idea doesn't exist; raises if prompt_id is supplied but not found; any Bedrock failure is recorded as a tool-error metric and re-raised.

iterate_post

iterate_post(post_id: str, workspace_id: str, instruction: str) -> str

Fetches the post's current content, sends it plus your instruction to Bedrock with a fixed editor persona (no prompt_id parameter exists on this tool — unlike the REST API's iterate, there's no way to customize the persona here), and overwrites the post's content directly.

{ "post_id": "post_abc", "new_content": "Revised post text..." }
⚠️

No version snapshot is taken. The REST-API-driven "accept a GenAI suggestion" flow records a genai_accept version (see Posts § Versions) before replacing content — this tool just overwrites content and updated_at, with no history of what was there before.

Errors: raises if the caller isn't a workspace member; raises if the post doesn't exist in the workspace; any Bedrock failure is recorded as a tool-error metric and re-raised.

See also

  • GenAI feature guide — product behavior and the MCP-vs-HTTP-API divergence in more depth.
  • GenAI API reference — the non-persisting REST equivalents (/api/genai/generate, /api/genai/iterate).