Create a default toolset
Gram uses your API as the starting point for the creation of your MCP server. A toolset will be generated with one tool for every API method (GET, POST, PUT, DELETE) in your API, or custom tools defined in Gram Functions. This will be the default toolset.
This toolset is created via an uploaded source such as an OpenAPI document or Gram Function.
The default toolset will likely contain too many tools for an LLM to use effectively in production. Before launching the MCP server, a custom toolset will be curated to contain only the tools that are relevant to the intended use case.
Generating tools from sources
Gram converts sources into tool definitions that MCP clients can understand and use. This guide focuses on OpenAPI documents, but you can also create tools from Gram Functions for custom logic.
Using OpenAPI documents
Gram converts OpenAPI endpoints into tool definitions.
To upload an OpenAPI document:
- In the Gram dashboard, click Toolsets in the sidebar (under Create).
- Click + Add API.

- Select the OpenAPI document to upload and add the API name.

Gram will parse the uploaded OpenAPI document and generate tool definitions for each endpoint method.
How it works
Gram does not make use of the entire OpenAPI document, therefore the document does not need to be 100% valid in order to successfully generate tool definitions.
In particular, Gram will pull out the URL paths, HTTP methods, request schemas, and operation descriptions.
Most OpenAPI documents, do not contain detailed, contextual descriptions. That’s okay. Context can be added via prompts in Gram or added to the OpenAPI document with the x-gram extension to help LLM agents understand and use your tools correctly.
Last updated on