Skip to content

MCP instructions: describe the result shape and how to run a captured plan, so agents stop hunting for hidden output #23

Closed

Description

@joeldickson

What happened

On 2026-10-28 a Cursor agent (ShipLean through the MCP gateway) was asked:

https://shiplean.blah/p/UNF/items/UNF-21 launch subagents using composer model to do the work, just to V1 release stage

UNF-21 already has a captured plan: 16 stories, 24 tasks, waves 0 to 3.1. The agent didn't start the work. It:

  1. Called two ShipLean tools and got one-line summaries back.
  2. Listed Cursor's saved tool-output files (~/.cursor/projects/*/agent-tools/*.txt) to see if the full payload had been saved anywhere.
  3. Grepped its own past transcripts for "how earlier sessions read ShipLean items in full".

The earlier session that captured the plan went further. It read ShipLean's source to find out why results were summaries, then read the guide Markdown from the repo instead of the tool. It also inspected ~/.cursor/mcp.json for a static auth header it could use to call the gateway with curl.

The cause, results only in structuredContent, is #21. This issue is about the instructions. Nothing tells an agent what it's looking at, so every session works it out the expensive way, and some go looking for credentials.

Where the instructions let the agent down

  • The result shape isn't described. An agent that sees one line can't tell whether it's a summary of hidden JSON, the whole answer, or a bug.
  • Tool descriptions promise more than a text-only client gets. get_work_item says "Everything about one work item… its fields, revision, the parents above it, its children…, links, its attachments, the last 5 comments…". The agent sees UNF-44 …: New, revision 1, 0 children, 0 attachments, 0 recent comments. That gap is what sends it hunting.
  • The guidance tools return no guidance as text. planning_guide returns The guide part of the planning guide. and get_brief returns The brief for UNF-21. (GuideTools.cs:40, BriefTools.cs:49). For these two tools the Markdown is the result, so there's nothing to summarise. This is also what breaks running a plan: the conductor can't read the waves, and it has no brief to hand each subagent.
  • There's no route for "run this plan". The server instructions cover idea → Feature, and "call planning_guide before you break down a feature". They don't say how to run a captured plan: call get_brief on the Feature for the waves, then get_brief on each task for its agent's brief, and each agent calls report_task. Without that, the agent went to its transcripts instead.
  • Nothing says the MCP is the only way in. Agents looked for a REST API, a CLI, tokens in env, and auth headers in mcp.json.

Proposed changes

  1. Describe the result shape in the server instructions (McpServerServices.Instructions), for example: "Every result is one summary line plus a JSON object with the full result. If you see only the summary line, your client is hiding the JSON. Don't search saved output, transcripts, or ShipLean's source for it. Tell the person, and continue with the tools whose summary line has what you need."
  2. Return planning_guide and get_brief Markdown as text content, not only inside structuredContent. This is worth doing before MCP tools are unusable from text-only clients: capture_plan's preview token and read-backs are only in structuredContent #21, because these are the tools the instructions send agents to first.
  3. Add the run-a-plan route to the server instructions, in one sentence: "To run a captured plan, call get_brief on the Feature for its waves, then get_brief on each task and give that brief to the agent doing it, and have each agent call report_task when it's done."
  4. Say the MCP is the only way in: "Agents reach ShipLean only through these tools. There's no API token, CLI or header to use instead."
  5. When a summary line hides something the next call needs, say so in the line. For example, capture_plan's preview should name the plan value, and say what to do if it isn't visible.

Acceptance criteria

  • The server instructions describe the result shape, the run-a-plan route, and that the MCP is the only way in.
  • planning_guide and get_brief return their Markdown in text content.
  • Replaying the UNF-21 prompt in Cursor: the agent calls get_brief on UNF-21 within its first few calls, without listing saved files, grepping transcripts, reading ShipLean's source, or reading MCP config.

Related: #21 (server side: also return the result JSON as text).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions