Skip to content

Conversation

@jhauga
Copy link
Contributor

@jhauga jhauga commented Dec 2, 2025

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description

Generates a quasi-tldr for files in agents, collections, instructions, and prompts, plus general Copilot documentation queries, condensing and formatting the results as tldr command-line calls.

Tested on several prompt files. All output was good. Handles variations like if an agent file was passed.

Test Case

/tldr-prompt #file:typescript-mcp-server-generator.prompt.md
Results
I'll read the file typescript-mcp-server-generator.prompt.md and create a tldr summary. 

Read file:typescript-mcp-server-generator.prompt.md

# typescript-mcp-server-generator

> Generate a complete, production-ready Model Context Protocol (MCP) server in TypeScript with tools, resources, and proper configuration.
> Creates a full project structure with @modelcontextprotocol/sdk, zod validation, TypeScript ES modules, and either HTTP or stdio transport.
> More information: <typescript-mcp-server-generator.prompt.md>

- Generate a basic MCP server with stdio transport and one tool:

`/typescript-mcp-server-generator "Create an MCP server with stdio transport and a file reading tool"`

- Generate an HTTP-based MCP server with Express:

`/typescript-mcp-server-generator "Create an HTTP MCP server with port 3000 and database query tools"`

- Generate an MCP server with multiple tools and resource support:

`/typescript-mcp-server-generator "Create an MCP server with file operations, API integration tools, and resource templates"`

- Generate an MCP server with custom tool for data transformation:

`/typescript-mcp-server-generator "Create an MCP server with a JSON transformation tool using zod validation"`

- Generate an MCP server with sampling support for LLM-powered features:

`/typescript-mcp-server-generator "Create an MCP server with text summarization tool that uses sampling"`

- Generate a complete MCP server with prompts and resources:

`/typescript-mcp-server-generator "Create a full-featured MCP server with tools, preconfigured prompts, and dynamic resources"`

- Generate an MCP server with specific configuration options:

`/typescript-mcp-server-generator "Create an MCP server with environment-based config, CORS support, and error handling"`

## Key Components

**Project Setup**: Initializes TypeScript/Node.js project with `@modelcontextprotocol/sdk`, `zod@3`, ES modules (`"type": "module"`), and dev dependencies like `tsx`.

**Server Types**: 
- **stdio**: Uses `StdioServerTransport` for local/command-line MCP servers
- **HTTP**: Uses `StreamableHTTPServerTransport` with Express for network-accessible servers

**Tool Implementation**: Uses `registerTool()` with zod schemas for validation, returns both `content` and `structuredContent`, includes async support and error handling.

**Optional Features**: Supports `registerResource()` for dynamic resources with ResourceTemplate, `registerPrompt()` for preconfigured prompts, sampling for LLM integration, and notification debouncing.

**Testing**: Run with `npm start` or `npx tsx server.ts`, test with `npx @modelcontextprotocol/inspector`, HTTP servers connect at `http://localhost:PORT/mcp`.

And test regarding something relevant to VS Code Copilot

Test Case

/tldr-prompt "How do MCP servers work?" #fetch https://code.visualstudio.com/docs/copilot/customization/mcp-servers
Results
I'll fetch the MCP server documentation from https://code.visualstudio.com/docs/copilot/customization/mcp-servers and create a tldr summary of how MCP servers work. 

Using "Fetch Web Page"

Fetched https://code.visualstudio.com/docs/copilot/customization/mcp-servers

# MCP servers

> Model Context Protocol (MCP) is an open standard that connects AI models to external tools and services through a unified interface in VS Code.
> MCP servers provide tools, resources, and prompts to extend GitHub Copilot Chat capabilities for tasks like file operations, databases, and API interactions.
> More information: <https://code.visualstudio.com/docs/copilot/customization/mcp-servers>

- Install an MCP server from the GitHub registry via Extensions view:

`@mcp` in Extensions search or `MCP: Browse Servers`

- Add an MCP server to workspace using configuration file:

`MCP: Open Workspace Folder Configuration` → Edit `mcp.json`

- Use an MCP tool automatically with agents in chat:

Open tool picker → Select MCP tools → Ask question (tools invoked automatically)

- Reference an MCP tool explicitly in your prompt:

`#{{tool-name}}`

- Add an MCP resource as context in chat:

`Add Context > MCP Resources > {{resource-type}}`

- Invoke an MCP server's preconfigured prompt:

`/mcp.{{servername}}.{{promptname}}`

- Restart an MCP server after configuration changes:

`MCP: List Servers > {{server-name}} > Restart Server`

- View MCP server logs for troubleshooting:

`MCP: List Servers > {{server-name}} > Show Output`

## How MCP Servers Work

**Architecture**: MCP servers run as separate processes that communicate with VS Code through standard I/O (stdio), HTTP, or Server-Sent Events (SSE). They're configured in `mcp.json` files at user or workspace level.

**Configuration**: Servers are defined with connection details (command/args for stdio, URL for HTTP/SSE), optional environment variables, and input placeholders for sensitive data like API keys. VS Code discovers server capabilities (tools, resources, prompts) on first start and caches them.

**Transport Methods**:
- **stdio**: Most common for local servers (npx, node, python, docker commands)
- **HTTP/SSE**: For remote servers or network-accessible services  
- **Unix sockets/Named pipes**: Local servers listening on sockets (`unix:///path/to/server.sock`) or pipes

**Three Capabilities**:
- **Tools**: Functions that agents can invoke automatically or you can reference with `#tool-name`
- **Resources**: Direct access to data (files, database tables) you can add as context
- **Prompts**: Preconfigured prompts you invoke with `/mcp.servername.promptname`

**Trust & Security**: VS Code prompts for confirmation before starting any MCP server for the first time. Servers can run arbitrary code—only add from trusted sources. Reset trust with `MCP: Reset Trust`.

**Tool Usage**: Maximum 128 tools per chat request due to model constraints. Use tool picker to enable/disable specific tools or group related tools into tool sets for easier management.

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New chat mode file.
  • New collection file.
  • Update to existing instruction, prompt, chat mode, or collection.
  • Other (please specify):

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings December 2, 2025 02:36
Copilot finished reviewing on behalf of jhauga December 2, 2025 02:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new prompt file tldr-prompt.prompt.md that generates concise tldr-style summaries for GitHub Copilot customization files (prompts, agents, instructions, collections), MCP server documentation, and general Copilot documentation. The prompt uses the claude-sonnet-4 model and integrates tools for fetching web content and searching the workspace, making it a versatile documentation summarization tool.

Key Changes

  • Adds a comprehensive prompt that creates tldr-pages-style summaries with example-driven documentation
  • Implements smart query resolution that searches workspace files first, then falls back to the awesome-copilot repository on GitHub
  • Updates the README to include the new TLDR Prompt entry in alphabetical order

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
prompts/tldr-prompt.prompt.md New prompt file that generates tldr summaries for Copilot files and documentation, with comprehensive workflow, template guidelines, and query resolution strategies
docs/README.prompts.md Adds the TLDR Prompt entry to the prompts table in alphabetical order between "Test Planning" and "TUnit Best Practices"

Apply suggestion.

Co-authored-by: Copilot <[email protected]>
@aaronpowell aaronpowell merged commit cdbe213 into github:main Dec 2, 2025
2 checks passed
@jhauga jhauga deleted the tldr-prompt branch December 2, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants