toolintermediate
Show HN: Gram Functions – Serverless platform for turning code into LLM tools
By disintegratorhackernews
View original on hackernewsGram Functions is a serverless platform that converts user-written code into LLM tools and MCP servers, addressing limitations of REST APIs for agent use. It provisions fly.io machines to host code behind a Go server, allowing developers to curate small, context-aware MCP servers by cherry-picking tools from custom functions and OpenAPI documents.
Key Points
- •Gram Functions enables developers to write custom code and automatically deploy it as LLM-compatible tools without manual infrastructure setup
- •The platform provisions Fly.io machines to host user code behind a Go server that listens for tool calls from LLM agents
- •Users can curate small, focused MCP servers by cherry-picking tools from custom code and OpenAPI documents, reducing context bloat from massive servers
- •Get started immediately using `pnpm create @gram-ai/function` (or npm/bun equivalents) to scaffold a new function
- •Gram solves the problem that existing REST APIs are often unsuitable as LLM tools by allowing direct code-based tool creation
- •The dashboard provides a unified interface to manage multiple MCP servers, each tailored for specific agent use cases
- •Selective tool curation per agent prevents context bloat and improves LLM performance by limiting available tool scope
- •The platform combines code deployment, hosting, and MCP server generation into a single serverless workflow
Found this useful? Add it to a playbook for a step-by-step implementation guide.
Workflow Diagram
Start Process
Step A
Step B
Step C
Complete
Concepts
Artifacts (3)
Gram Function Setup Commandcommand
pnpm create @gram-ai/functionGram Function Setup (npm)command
npm create @gram-ai/functionGram Function Setup (bun)command
bun create @gram-ai/function