KEMBAR78
MCP: Support Resource primitive as Add Context entries · Issue #244159 · microsoft/vscode · GitHub
Skip to content

MCP: Support Resource primitive as Add Context entries #244159

@digitarald

Description

@digitarald

Resources enable servers to expose structured data for LLM context enrichment. They act as standardized data containers that users can selectively add as context into Copilot interactions.

URI Identification

  • Unique identifiers using custom URI schemes
    • Format: [protocol]://[host]/[path]
    • Examples: file:///logs/app.log, postgres://db/customers

Data Types

  • Text Resources: UTF-8 content (code, logs, configs)
  • Binary Resources: Base64-encoded data (images, PDFs)

Discovery Methods

  1. Direct listing via resources/list endpoint
  2. URI templates for dynamic resources

Access Patterns

  • Clients request specific resources via resources/read
  • Batch retrieval supported (multiple resources per request)

Update System

  • Real-time notifications for:
    • List changes (list_changed)
    • Content updates (resources/updated)
  • Subscription model for monitoring changes

Use Cases

  • Embedding API responses in prompts
  • Providing live system metrics
  • Including document snippets
  • Sharing screenshots/images

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions