Structured Output

👨‍💼 When users open EpicMe, they expect their memories, reflections, and daily adventures to be organized, discoverable, and (most importantly) reliable. Imagine a user writing a heartfelt entry about their day, only to have it saved as a jumbled scroll of text! That would be chaos in their personal archive.
To ensure every tool in EpicMe returns information that is both predictable and easy for the UI (and our friendly LLM assistants) to understand, we use structured output. This means every tool response follows a clear, machine-validated shape—no more wild guesses or mysterious blobs of data.
{
  name: 'create_magical_creature',
  description: `Add a new magical creature to the user's stable.`,
  inputSchema: { /* ... */ },
  outputSchema: { creature: magicalCreatureSchema },
},
async (input) => {
  const creature = await agent.db.createCreature(input)
  const structuredContent = { creature }
  return {
    structuredContent,
    content: [
      createText(`Creature "${creature.name}" added to your stable!`),
      createCreatureResourceLink(creature),
      createText(structuredContent),
    ],
  }
}
Here's what a structured output response looks like:
{
	"content": [
		{
			"type": "text",
			"text": "Creature \"Twinklehoof\" added to your stable!"
		},
		{
			"type": "resource_link",
			"uri": "epicme://creatures/42",
			"mimeType": "application/json"
		},
		{
			"type": "text",
			"text": "{\"creature\":{\"id\":42,\"name\":\"Twinklehoof\",\"species\":\"Unicorn\"}}"
		}
	],
	"structuredContent": {
		"creature": {
			"id": 42,
			"name": "Twinklehoof",
			"species": "Unicorn"
		}
	}
}
Note that the structuredContent is a JSON object that matches the outputSchema of the tool and we also have a text content that is a JSON string equal to the structuredContent object. This is a fallback for clients that don't support structured output and is validated by the MCP Inspector.
📜 For more details on structured output and output schemas, see the official MCP documentation.
The goal: make every journaling action in EpicMe feel seamless, safe, and delightful—so users can focus on capturing their stories, not on deciphering cryptic responses.
🐨 Note (again): I have you add this to every tool, but feel free to stop and move on.
To test this in the MCP inspector, simply connect and click "Tools" and "List Tools," then check the output schema in the response. Then you can run one of the tools and verify the output includes the structured content.

Please set the playground first

Loading "Structured Output"
Loading "Structured Output"
Login to get access to the exclusive discord channel.
  • 💪Adv. MCP Features
    Should I ignore deprecation warning in Adv. MCP Features?
    silvanet 🚀 🌌 ⚡:
    I got The `util._extend` API is deprecated. Please use Object.assign() instead.
    1 · 10 hours ago
  • General
    Epic MCP server not initializing
    steve ⚡:
    I am attempting to configure the Epic MCP Server per Kent's instructions here: https://www.epicai.pr...
    • 2
    3 · 2 days ago
  • 💪Adv. MCP Features
    Elicitation
    nicolai-marina ⚡:
    After completing the elicitation exercise, I am not able to see the form, which confirms the deletio...
    • 1
    5 · 3 days ago
  • General
    What will tomorrows MCP hosts look like?
    Paul 🚀:
    Hi Kent,

Thanks for putting together the course, I’m really enjoying it. Im interested if you have...
    • 1
    2 · 3 days ago
  • 💪Adv. MCP Features
    console.log(capabilities) in Elicit Confirmation exercise
    Rednar ⚡:
    In the solution video, at second 0:55, there's a console.log(capabilities) and Kent says we'll come ...
    • 1
    3 · 4 days ago
  • General
    VS Code Copilot and Epic Workshop MCP Server
    Alexandre 🚀:
    I might have missed something, but how do we install the Epic Workshop MCP Server so we can ask Copi...
    • 1
    3 · 4 days ago
  • 💪Adv. MCP Features
    Resource Templates returning text instead of a schema
    BeyondLimits99 ⚡:
    I was just wondering about the resource templates. I noticed that you're returning the entry schema ...
    • 1
    5 · 4 days ago
  • 🐣MCP Fundamentals
    💪Adv. MCP Features
    🔐MCP Auth
    💻MCP UI
    What about the usage of MCP Servers for some kind of chat interacting with a local LLM?
    frankfullstack ⚡:
    I would like to raise a general question about the usage of MCP Servers and how we could interact fr...
    • 1
    5 · 10 days ago
  • 💪Adv. MCP Features
    Stateful Server Discussion: Elicitation Exercise and Sampling Exercise
    jbandi:
    I am still trying to wrap my head around the stateful communication model of MCP, which is different...
    • 1
    53 · 7 days ago
  • 🐣MCP Fundamentals
    General
    It'd be really cool to have a basic deployment guide.
    BeyondLimits99 ⚡:
    The course has been amazing so far! I'd love to have a basic deployment guide just so I can practice...
    • 2
    3 · 7 days ago
  • 💪Adv. MCP Features
    McpServer Instance Lifecycle
    jbandi:
    ​You just said in the q&a of the office hours that the Mcp Server Instance is "long running" like an...
    • 1
    1 · 6 days ago
  • 💪Adv. MCP Features
    Figuring out isOpenWorld when calling ffmpeg or similar
    Kamran ⚡:
    I would love if you wanted to take this into office hours and expand on how you think about isOpenWo...
    • 👍2
    • 1
    1 · 7 days ago
  • General
    non-related question: how do you rollout updates?
    mark:
    I'm very curious to hear: How do you roll-out new updates? do you use some kind of libary?
    • 1
    5 · 11 days ago
  • 🐣MCP Fundamentals
    General
    How do you teach the LLMs to use ResourceTemplates and ResourceTemplatesList?
    frontendwizard:
    I'm playing around with building an mcp with claude and he has a tendency to go for json for everyth...
    • 1
    8 · 9 days ago
  • 🐣MCP Fundamentals
    General
    MCP to MCP
    Mahendra Hirapra ⚡:
    Does it possible one MCP sever connect to other MCP like chain? I would like to connect Figma MCP Se...
    • 1
    4 · 10 days ago
  • 🐣MCP Fundamentals
    General
    When does an MCP become overkill—that is, when should one avoid building one?
    Lax ⚡:
    Just wondering what scenarios to skip 🙂
    • 1
    2 · 10 days ago
  • 🐣MCP Fundamentals
    General
    💻MCP UI
    🔐MCP Auth
    Are the live sessions, Q&A's or will there be some lectures about concepts around MPC Stack?
    Handax ⚡:
    I’m interested in diving deeper into the Model Contexts Protocol (MCP) and was wondering if there wi...
    • 1
    1 · 10 days ago
  • General
    Lesson lengths
    ffkml ⚡:
    I’m excited for the class to kick off next week. Planning ahead, how long should we plan for lessons...
    • 👍3
    • 1
    1 · 15 days ago