Skip to main content
Glama

discover

Find Disney park experiences using natural language queries like 'thrill rides for teenagers' or 'romantic dinner spots' through semantic search.

Instructions

Discover Disney experiences using natural language. Uses semantic search to find entities matching concepts like 'thrill rides for teenagers', 'romantic dinner spots', or 'character breakfast'. Requires initialize to be run first. For exact name lookups, use search instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language query describing what you're looking for (e.g., 'thrill rides', 'romantic dinner', 'kid-friendly attractions')
destinationNoLimit search to a destination: 'wdw' or 'dlr'
entityTypeNoFilter by entity type
limitNoMaximum number of results (default: 5, max: 20)

Implementation Reference

  • The main execution logic for the 'discover' tool, using semanticSearch to find matching Disney entities based on natural language query.
    export const handler: ToolHandler = async (args) => {
      return withTimeout(
        "discover",
        async () => {
          const query = args.query as string | undefined;
          const destination = args.destination as DestinationId | undefined;
          const entityType = args.entityType as EntityType | undefined;
          const limit = Math.min(
            Math.max((args.limit as number | undefined) ?? DEFAULT_DISCOVER_LIMIT, 1),
            MAX_DISCOVER_LIMIT
          );
    
          if (!query) {
            return formatErrorResponse(new ValidationError("'query' is required", "query", null));
          }
    
          try {
            const results = await semanticSearch<DisneyEntity>(query, {
              destinationId: destination,
              entityType,
              limit,
              minScore: DEFAULT_MIN_SIMILARITY_SCORE,
            });
    
            if (results.length === 0) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: JSON.stringify(
                      {
                        query,
                        found: false,
                        message:
                          "No matching entities found. Run initialize first to load data and generate embeddings.",
                      },
                      null,
                      2
                    ),
                  },
                ],
              };
            }
    
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify(
                    {
                      query,
                      found: true,
                      count: results.length,
                      results: results.map((r) => ({
                        name: r.entity.name,
                        id: r.entity.id,
                        type: r.entity.entityType,
                        destination: r.entity.destinationId,
                        park: r.entity.parkName,
                        score: Math.round(r.score * 100) / 100,
                        distance: Math.round(r.distance * 1000) / 1000,
                      })),
                    },
                    null,
                    2
                  ),
                },
              ],
            };
          } catch (error) {
            return formatErrorResponse(error);
          }
        },
        TIMEOUTS.SEARCH
      );
    };
  • Tool definition and input schema for the 'discover' tool, specifying parameters like query, destination, entityType, and limit.
    export const definition: ToolDefinition = {
      name: "discover",
      description:
        "Discover Disney experiences using natural language. " +
        "Uses semantic search to find entities matching concepts like 'thrill rides for teenagers', " +
        "'romantic dinner spots', or 'character breakfast'. " +
        "Requires initialize to be run first. For exact name lookups, use search instead.",
      inputSchema: {
        type: "object" as const,
        properties: {
          query: {
            type: "string",
            description:
              "Natural language query describing what you're looking for " +
              "(e.g., 'thrill rides', 'romantic dinner', 'kid-friendly attractions')",
          },
          destination: {
            type: "string",
            description: "Limit search to a destination: 'wdw' or 'dlr'",
            enum: ["wdw", "dlr"],
          },
          entityType: {
            type: "string",
            description: "Filter by entity type",
            enum: ["ATTRACTION", "RESTAURANT", "SHOW"],
          },
          limit: {
            type: "number",
            description: `Maximum number of results (default: ${DEFAULT_DISCOVER_LIMIT}, max: ${MAX_DISCOVER_LIMIT})`,
          },
        },
        required: ["query"],
      },
    };
  • Registration of the 'discover' tool (line 25) in the tools array, along with the registerTools function that adds all tools to a lookup map.
    /** All available tools */
    const tools: ToolEntry[] = [
      { definition: destinations.definition, handler: destinations.handler },
      { definition: attractions.definition, handler: attractions.handler },
      { definition: dining.definition, handler: dining.handler },
      { definition: search.definition, handler: search.handler },
      { definition: discover.definition, handler: discover.handler },
      { definition: status.definition, handler: status.handler },
      { definition: sync.definition, handler: sync.handler },
    ];
    
    /**
     * Register all tools into a Map for lookup.
     */
    export function registerTools(toolMap: Map<string, ToolEntry>): void {
      for (const tool of tools) {
        toolMap.set(tool.definition.name, tool);
      }
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the semantic search approach and the initialize prerequisite, which adds useful context. However, it doesn't describe what happens when the tool is invoked (e.g., response format, error handling, or performance characteristics like rate limits), leaving gaps in behavioral understanding.

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 perfectly front-loaded and concise with three sentences that each earn their place: the core purpose, the semantic search mechanism with examples, the prerequisite, and the alternative tool guidance. There is zero wasted text, making it highly efficient.

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

Completeness3/5

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

Given the tool's moderate complexity (4 parameters, semantic search functionality) and no output schema, the description provides good purpose and usage guidance but lacks details about what the tool returns. Without annotations or output schema, the agent won't know the format or structure of results, which is a significant gap for a discovery tool.

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?

The schema description coverage is 100%, so the schema already fully documents all four parameters. The description mentions 'natural language query' which aligns with the query parameter's schema description, but doesn't add significant meaning beyond what's already in the structured schema. The baseline of 3 is appropriate when the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('discover Disney experiences') and resources ('entities'), and explicitly distinguishes it from the sibling 'search' tool for exact name lookups. It provides concrete examples of what can be discovered, making the purpose immediately understandable.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('using natural language', 'semantic search to find entities matching concepts') versus when to use alternatives ('For exact name lookups, use search instead'). It also specifies a prerequisite ('Requires initialize to be run first'), giving clear context for proper usage.

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/cameronsjo/mouse-mcp'

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