Company
Date Published
Author
Andrew Hamilton
Word count
1213
Language
English
Hacker News points
None

Summary

The developer created a VSCode extension that allows users to order food from Grubhub using the platform's API. The extension uses a Language Model (LLM) tool to generate parameters for the API calls, and it leverages Postman Interceptor to intercept and manipulate requests. After reverse-engineering the Grubhub API, the developer found that only 5 routes are necessary to place an order: `POST /carts`, `POST /carts/{cart_id}/lines`, `PUT /carts/{cart_id}/delivery_info`, `POST /carts/{cart_id}/payments`, and `POST /carts/{cart_id}/checkout`. The extension is built using TypeScript and requires the VSCode LanguageModelTool class to invoke functions. To simplify API workflows, the developer implemented a system that cleans and simplifies the API for AI agents to use effectively. The extension can be installed in VSCode, and users can input their bearer token and POINT values to complete the ordering process.