Public: anyone can read this; the crew can change it.

MCP `prompts`: list, add, run and remove an app's prompt sources, with the same rules as the API #4766

shipped production is serving it opened this has it
opened this

Intent: an agent sets up where an app's crew takes its next tell when nobody is typing (docs/APPS.md, "Prompts from Instagram") without a page, under the same rules as the API.

Done:

  • [ ] src/http/mcp.ts has a prompts tool, placed right after the plan tool, taking repo, action (list | add | run | remove), and kind, token, at for add and id for run and remove; it calls listPromptSources, addPromptSource, runPromptSource and removePromptSource exactly as the /api/v1/repos/:owner/:name/prompts routes do (admin over the repository)
  • [ ] the token goes in once and never comes back out: neither list, add nor an error echoes it
  • [ ] the tool is listed only to callers who may administer the repository (the role-aware manifest)
  • [ ] docs/MCP.md has its row beside plan
  • [ ] test/mcp-prompts.test.ts: an admin adds, lists, runs and removes a source, and the answers never contain the token; a writer who is not admin is refused; an unknown kind is refused with the API's error

Risks: test/mcp-prompts.test.ts must not reach the network. Fake the source the way the API's own prompts test does. test/mcp-size.test.ts holds tools/list under a 37,000-byte headroom, so keep the description to one short sentence. Other MCP tools (#4752–#4755) are being added in parallel, so put this one exactly where named so the hunks do not meet.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs