Skip to main content
Glama

Search script

search_script
Read-onlyIdempotent

Find screenplay elements whose text contains the query (case-insensitive substring), in script order. Each match has elementId, type, the containing sceneId and sceneLabel (null outside any scene, e.g. title page or episode/act headings) and a ~160-character snippet around the match. Filter with types (e.g. ["DIALOGUE", "CHARACTER"]). truncated is true when more matches exist than limit. Use get_scene with the sceneId to read the full scene. An empty query lists the script instead: every element (of the given types) in script order, up to limit, each snippet the start of its text. For example query "" with types ["SCENE_HEADING"] lists the scene headings; get_project_outline is the cheaper overview.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectId": "<projectId>"
    },
    "name": "search_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum matches to return (1-100, default 25).
queryNoText to find (case-insensitive substring). Empty or omitted lists the script's elements in order instead.
typesNoOnly search these element types (e.g. ["DIALOGUE"]).
projectIdYesScreenWeaver project id (from list_projects).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / query / default
      Added value: +""
    • changedInput schema / properties / query / description
      Previous value: -"Text to find (case-insensitive substring)."New value: +"Text to find (case-insensitive substring). Empty or omitted lists the script's elements in order instead."
    • removedInput schema / properties / query / minLength
      Removed value: -1
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "projectId"
      -]New value: +[
      +  "projectId"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the full result shape (elementId, type, sceneId, sceneLabel with null outside scenes, ~160-char snippet) and the meaning of the truncated flag as "more matches exist than limit". Those are behavioral traits the annotations cannot convey and they directly affect whether an agent must re-run with a higher limit.

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

Conciseness4/5

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

Front-loaded with the core operation and result shape, and every clause carries information. The second half is one long chained sentence, so it is dense but not padded.

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

Completeness5/5

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

No output schema exists, and the description compensates by documenting the return fields, the truncated flag, and null scene handling. Combined with the sibling routing hints, an agent has everything needed to call it and interpret the response correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already defines limit, query, types and projectId. The description adds real meaning on top: the empty-query semantics, a concrete types example, and the get_scene follow-up. Only the limit bounds are left entirely to the schema, so it sits just above the baseline.

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?

States a precise verb and resource ("Find screenplay elements whose text contains the query") plus matching semantics (case-insensitive substring) and ordering (script order). It also distinguishes itself from get_scene (read full scene) and get_project_outline (cheaper overview), so an agent can separate it from siblings without opening a schema.

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?

Gives explicit routing rules: use get_scene with the returned sceneId for full text, use get_project_outline when a cheaper overview suffices, and use an empty query with types to enumerate elements such as ["SCENE_HEADING"]. When-to-use and when-to-use-something-else are both spelled out, including the enumeration fallback.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.