Integrations/Knowledge
Intermediate12 min

MCP Resources & Prompts

Resources, Prompts, and Elicitation are the three MCP primitives engineers most often skip. Here's what they're actually for, when to reach for each, and what breaks in production when you ignore them.

Quick Reference

  • Resources = read-only data (schemas, configs, docs) — discover with session.list_resources(), read with session.read_resource(uri)
  • LangChain adapter: client.get_resources(server_name) fetches all resources as Blobs — it reads content, not lists metadata
  • Prompts = reusable templates — discover with session.list_prompts(), load with client.get_prompt(server, name, args)
  • Elicitation = server pauses a tool call to request user input — two modes: form (structured data) and URL (OAuth/credentials)
  • Form mode MUST NOT request passwords, API keys, or secrets — use URL mode for any credentials
  • Elicitation returns three actions: accept (with data), decline (explicit no), cancel (dismissed) — handle all three
  • Resource subscriptions let you receive change notifications instead of polling
  • Structured tool responses carry a structuredContent field (JSON) alongside the text fallback

When to Use Resources, Prompts, or Elicitation

Most agents only use MCP tools. That's fine until you have an agent that needs context it shouldn't be able to modify, or prompts that need to change without a redeploy, or a tool call that requires a human decision before proceeding. That's when resources, prompts, and elicitation become load-bearing.

MCP Server PrimitivesResourcesServer → ClientRead-only data: schemas,configs, docs, API cachessession.list_resources()session.read_resource(uri)PromptsServer → ClientReusable message templateswith named parameterssession.list_prompts()client.get_prompt(svr, name, args)ToolsClient ↔ ServerFunctions the agent calls:queries, writes, API callssession.list_tools()session.call_tool(name, args)ElicitationServer-initiated requestServer pauses tool call torequest user approval or inputelicitation/create (form | url)→ accept / decline / cancel

Resources and Prompts deliver data — Tools and Elicitation are interactive

You need…UseWhy not the other
Context the agent shouldn't modify (schema, config, doc)ResourceTool: adds write risk and execution overhead. Prompt: templates, not data.
A prompt template that should change without redeployingPromptResource: carries raw data, not message structure. Local: breaks centralized management.
User approval or input before a tool executesElicitationinterrupt(): agent-initiated, not server-initiated. Tool: executes without stopping.
Dynamic per-request data (current DB rows, live API)ToolResource: read-only and cached. Resource is for stable, reference data.
Credentials or OAuth flowsElicitation (URL mode)Form mode: MUST NOT handle credentials per spec. Tool: credentials would transit MCP client.