Skip to main content
Glama

Search Simulations

search_simulations
Read-only

Search past simulations by topic, project name, or simulation ID to retrieve results from previous runs.

Instructions

Search past simulations by topic, project name, or simulation ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term — matches against simulation ID, project name, or requirement

Implementation Reference

  • Registration of the tool 'search_simulations' on the MCP server, with input schema, description, annotations, and handler.
    export function registerSearchSimulations(server: McpServer, client: MirofishClient): void {
      server.registerTool(
        "search_simulations",
        {
          title: "Search Simulations",
          description: "Search past simulations by topic, project name, or simulation ID.",
          inputSchema,
          annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
        },
        async (args) => {
          try {
            const results = await client.searchSimulations(args.query);
    
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify(
                    {
                      query: args.query,
                      results_count: results.length,
                      simulations: results.map((s) => ({
                        simulation_id: s.simulation_id,
                        project_name: s.project_name,
                        requirement: s.simulation_requirement,
                        state: s.state,
                        created_at: s.created_at,
                      })),
                    },
                    null,
                    2,
                  ),
                },
              ],
            };
          } catch (err) {
            throw toMcpError(err);
          }
        },
      );
    }
  • Handler function that calls client.searchSimulations(args.query) and returns formatted results (simulation_id, project_name, requirement, state, created_at).
    async (args) => {
      try {
        const results = await client.searchSimulations(args.query);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(
                {
                  query: args.query,
                  results_count: results.length,
                  simulations: results.map((s) => ({
                    simulation_id: s.simulation_id,
                    project_name: s.project_name,
                    requirement: s.simulation_requirement,
                    state: s.state,
                    created_at: s.created_at,
                  })),
                },
                null,
                2,
              ),
            },
          ],
        };
      } catch (err) {
        throw toMcpError(err);
      }
    },
  • Input schema: 'query' is a required string with a min length of 1, used to match against simulation ID, project name, or requirement.
    const inputSchema = {
      query: z.string().min(1).describe("Search term — matches against simulation ID, project name, or requirement"),
    };
  • Client-side search implementation: fetches up to 100 simulations via listSimulations, then filters client-side by matching query (case-insensitive) against simulation_id, project_name, or simulation_requirement.
    async searchSimulations(query: string): Promise<SimulationSummary[]> {
      // Backend doesn't have a search endpoint yet — fetch and filter client-side.
      const { simulations } = await this.listSimulations(100);
      const q = query.toLowerCase();
      return simulations.filter((s) =>
        (s.simulation_requirement ?? "").toLowerCase().includes(q) ||
        (s.project_name ?? "").toLowerCase().includes(q) ||
        s.simulation_id.toLowerCase().includes(q),
      );
    }
  • SimulationSummary interface: defines the shape of each simulation result returned by searchSimulations.
    export interface SimulationSummary {
      simulation_id: string;
      project_id: string;
      project_name?: string;
      simulation_requirement?: string;
      state: SimState;
      entities_count?: number;
      created_at: string;
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description adds minimal behavioral context beyond the search scope. It does not disclose result format or other traits, but annotations sufficiently cover safety.

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 a single, concise sentence that immediately communicates the tool's purpose with no superfluous words.

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?

For a simple search tool with one parameter and no output schema, the description provides the essential purpose but lacks details about the result structure or any pagination behavior, which would improve completeness.

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 100%, and the tool description repeats the parameter's purpose without adding new meaning. Baseline 3 is appropriate as the schema already handles the parameter documentation.

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 verb 'Search' and the resource 'past simulations', and lists specific searchable fields (topic, project name, simulation ID), making the tool's purpose distinct from sibling tools like list_simulations.

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

Usage Guidelines3/5

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

The description implies when to use the tool (search by topic/project/ID) but does not provide explicit guidance on when not to use it or how it differs from alternatives like list_simulations.

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/kakarot-dev/deepmiro'

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