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) }] };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the search functionality and a limit constraint, but lacks critical behavioral details such as authentication requirements, rate limits, pagination behavior, or what the search returns (e.g., format, fields). For a search tool with no annotations, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two short sentences that directly convey the tool's function and key parameter constraint. Every word earns its place, and it's front-loaded with the core purpose. No wasted verbiage or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema description coverage, and no output schema, the description is incomplete. It covers basic purpose and a parameter limit but misses essential context like return format, error handling, or integration with sibling tools. For a search tool, this leaves significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning by specifying that 'query' is for searching themes and 'limit' is optional with a max of 100, which clarifies beyond the schema's basic types and constraints. However, it doesn't detail query syntax or examples, leaving some semantic gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Search') and resource ('2slides themes'), making the purpose evident. It specifies searching 'by query' which adds context. However, it doesn't distinguish this search tool from potential sibling search tools (though none are listed among siblings), keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions an optional limit parameter but doesn't explain scenarios where this tool is appropriate or when other tools like 'slides_generate' might be preferred. No explicit usage context or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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