Skip to main content
Glama

Saffron MCP Server

by tvh
cookbook.ts1.29 kB
// Cookbook and section-related tools import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp"; import { z } from "zod"; import { CookbooksDocument, type CookbooksQuery, type CookbooksQueryVariables, SectionsByCookbookIdDocument, type SectionsByCookbookIdQuery, type SectionsByCookbookIdQueryVariables, } from "../generated/graphql.js"; import type { SaffronClient } from "../graphql"; import { registerGraphQlTool } from "../mcp"; export function registerCookbookTools(server: McpServer, client: SaffronClient) { registerGraphQlTool<CookbooksQuery, CookbooksQueryVariables>(server, client, { name: "cookbooks", description: "Get your cookbooks", document: CookbooksDocument, inputSchema: {}, }); registerGraphQlTool<SectionsByCookbookIdQuery, SectionsByCookbookIdQueryVariables>( server, client, { name: "sections_by_cookbook_id", description: "Get sections by cookbook ID. CookbookIds are globally unique and can be found through the cookbooks tool.", document: SectionsByCookbookIdDocument, inputSchema: { cookbookId: z .string() .describe( "The ID of the cookbook to get sections for. Get this using the cookbooks tool." ), }, } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tvh/saffron-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server