Skip to Content
MCP Platform DocumentationCreating TypeScript toolsTool tags

What are tool tags?

Tags are short labels that group related tools, such as billing, flags, or support. When tag-based tool filtering is enabled on an MCP server, a client can connect to a focused subset of the server’s tools by selecting one or more tags. See tag-based tool filtering for what tags enable and how the tags URL parameter works.

The Gram Functions Framework supports tags directly in tool definitions. Add tags to any tool using the top-level tags property:

import { Gram } from "@gram-ai/functions"; import * as z from "zod/mini"; const gram = new Gram().tool({ name: "create_invoice", description: "Create an invoice for a customer", tags: ["billing", "finance"], inputSchema: { customerId: z.string(), amount: z.number() }, async execute(ctx, input) { const invoice = await createInvoice(input.customerId, input.amount); return ctx.json(invoice); }, }); export default gram;

Tags persist across deployments, so a tool keeps its tags when the function is rebuilt and pushed again.

Tags and tag-based filtering

Tags defined on a Gram Function become the tool’s source tags. They are available as filters once tag-based filtering is enabled on the MCP server, and they can be overridden from the dashboard.

A tool variation that sets tags replaces the tags defined here. See tag-based tool filtering for the full precedence rules that decide which tags a tool is filtered by.

Next steps

Last updated on