MCP / AI
Examples MCP Tools

Examples MCP Tools

One tool exposes the examples domain to MCP clients (Claude Code, Claude Desktop): list_examples. Implementation: services/mcp/src/lkwiz_mcp/tools/examples.py.

⚠️

This is a read-only, single-tool surface, not a full MCP mirror of the REST API. There is no MCP tool for creating, updating, deleting, or importing an example from a post — those operations currently require the web app or the REST API directly. See Deviations from REST for other gaps worth knowing about before you build automation on top of this tool.

list_examples

list_examples(workspace_id: str) -> str

Lists example posts in a workspace used as style reference for AI generation. Requires the caller to be a member of workspace_id — no additional role check.

Returns (JSON-encoded string):

{
  "examples": [
    {
      "example_id": "e1e2e3e4-...",
      "workspace_id": "ws_123",
      "title": "How I closed my first enterprise deal",
      "content": "Full post text here...",
      "created_by": "user_111",
      "created_at": "2026-07-17T12:00:00+00:00"
    }
  ]
}

Only example_id, workspace_id, title, content, created_by, and created_at come back. tags, performance_notes, source_post_id, and updated_at are not in this response, even though those fields exist on the underlying DynamoDB item — _item_to_example simply doesn't read them. specs/SPECS.md §16.3.14 documents tags and performance_notes as part of this tool's response shape; treat that as aspirational, not what the current implementation returns.

Deviations from REST

The MCP tool talks to DynamoDB directly with the raw boto3 client (not the common.db helper the REST examples_service uses) and queries the base table directly rather than the GSI1 index the REST list_examples endpoint uses — both return the same set of examples, just via different DynamoDB access paths.

REST APIMCP tool
Fields returned per exampleFull record (tags, performance_notes, source_post_id if imported, updated_at, ...)Minimal subset — 6 fields (see above)
Create / update / delete / import-from-postFull REST surface — see Examples APINot available via MCP
Role/permission modelWorkspace membership only, no role checkSame — workspace membership only

In practice: use list_examples for a quick "what style references does this workspace have?" check from an AI client, but create, edit, delete, or import examples through the REST API or the web app.

See also