Skip to main content
Glama

themes_search

Find presentation slide themes by entering search queries, with optional results limit to refine discovery.

Instructions

Search 2slides themes by query. Optional limit (max 100).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Implementation Reference

  • Handler implementation for the 'themes_search' tool. Performs a GET request to the 2slides themes search API endpoint with query and optional limit parameters, returns JSON response or error.
    mcp.tool('themes_search', 'Search 2slides themes by query. Optional limit (max 100).', ThemesSearchArgs, async (args: any, _extra: any) => { const { query, limit } = args as z.infer<z.ZodObject<typeof ThemesSearchArgs>>; const search = new URLSearchParams({ query }); if (typeof limit === 'number') search.set('limit', String(limit)); const url = `${API_BASE_URL}/api/v1/themes/search?${search.toString()}`; const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, }); const data = await res.json(); if (!res.ok) { return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }], isError: true, }; } return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; });
  • Zod schema defining input arguments for the 'themes_search' tool: required 'query' string and optional 'limit' number (1-100).
    const ThemesSearchArgs = { query: z.string().min(1), limit: z.number().int().positive().max(100).optional(), };
  • src/server.ts:85-105 (registration)
    Registration of the 'themes_search' tool with MCP server, including description, schema, and inline handler function.
    mcp.tool('themes_search', 'Search 2slides themes by query. Optional limit (max 100).', ThemesSearchArgs, async (args: any, _extra: any) => { const { query, limit } = args as z.infer<z.ZodObject<typeof ThemesSearchArgs>>; const search = new URLSearchParams({ query }); if (typeof limit === 'number') search.set('limit', String(limit)); const url = `${API_BASE_URL}/api/v1/themes/search?${search.toString()}`; const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, }); const data = await res.json(); if (!res.ok) { return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }], isError: true, }; } return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; });

Other Tools

Latest Blog Posts

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/2slides/mcp-2slides'

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