---
title: "Building a VSCode Chat Extension to Order Lunch"
description: "A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools."
url: "https://swe.quest/articles/building-a-vscode-chat-extension-to-order-lunch-64da87e69c43d744"
canonical: "https://neon.com/blog/building-a-vscode-chat-extension-to-order-lunch"
source: "Neon"
published: "2025-03-07"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["ai-agents","developer-tools","typescript","api-design"]
---

# Building a VSCode Chat Extension to Order Lunch

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-03-07, 6 min read, How-to. Original: [https://neon.com/blog/building-a-vscode-chat-extension-to-order-lunch](https://neon.com/blog/building-a-vscode-chat-extension-to-order-lunch)

## Summary

A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools. Intercepting a real checkout with Chrome DevTools and Postman Interceptor showed that an order takes five calls: create cart, add line, set delivery info, attach payment, and checkout. Each endpoint becomes a JSON-schema tool declared in package.json and implemented with vscode.LanguageModelTool. The main lesson is that raw APIs make poor agent interfaces because they expose sessions and IDs that need extra calls, so they should be wrapped in simplified workflows.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- VS Code extension basics
- LLM function calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- TypeScript ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))

## Keywords

VS Code Chat API, GitHub Copilot, Grubhub, Postman Interceptor, LanguageModelTool

## Related posts

- [Building with the OpenAI Apps SDK: A Field Guide](https://swe.quest/articles/building-with-the-openai-apps-sdk-a-field-guide-4d32891d09b8bb2e.md): Render · 2025-10-29 · Medium · 8 min read · AI agents, LLMs, Developer tools, TypeScript, Debugging
  OpenAI's Apps SDK extends the Model Context Protocol with a widget layer: tools that return structuredContent with \`\_meta.openai/outputTemplate\` metadata get rendered as inline React components in ChatGPT.
- [How to Build GitHub Copilot Extensions](https://swe.quest/articles/how-to-build-github-copilot-extensions-be22dc85804ae8a3.md): Neon · 2025-02-06 · Medium · 5 min read · AI for coding, AI agents, Python, Developer tools
  GitHub Copilot extensions are plain HTTP servers that GitHub calls whenever a user mentions the extension in Copilot Chat, so they can be written in any language.
- [Implementing MCP Servers in Python: An AI Shopping Assistant with Gradio](https://swe.quest/articles/implementing-mcp-servers-in-python-an-ai-shopping-assistant-with-gradio-21ac8e123355c19a.md): Hugging Face · 2025-07-31 · Medium · 4 min read · AI agents, Python, LLMs
  Gradio's MCP integration turns Python functions into LLM tools: launching an app with mcp\_server=True exposes each endpoint as an MCP tool, with names, descriptions and input schemas generated from function docstrings, plus progress streaming and file upload handling.
- [Using the GitHub Copilot SDK for Java](https://swe.quest/articles/using-the-github-copilot-sdk-for-java-66dac2758b7e2365.md): GitHub Engineering · 2026-08-10 · Medium · 9 min read · Java & JVM, AI agents, LLMs, Concurrency
  GitHub Copilot SDK for Java lets server-side Java code create agent sessions, register tools, send prompts and stream events without depending on Langchain4j or Spring AI, and with BYOK it can target OpenAI, Azure, Anthropic or compatible endpoints.
- [Tiny Agents: an MCP-powered agent in 50 lines of code](https://swe.quest/articles/tiny-agents-an-mcp-powered-agent-in-50-lines-of-code-6bc1baf5d192d871.md): Hugging Face · 2025-04-25 · Medium · 10 min read · AI agents, LLMs, TypeScript
  An LLM agent built on the Model Context Protocol reduces to a simple while loop around an MCP-aware inference client: connect to MCP servers, convert their tools into OpenAI-style function definitions, pass them to the chat-completion call, execute returned tool calls via the MCP SDK, and feed results back.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
