Skip to main content
Glama

typst_grep_project

Search text or regular expressions across Typst project files and return matching lines with file paths, line numbers, and optional context.

Instructions

Search for text or regular expressions across files in a https://typst.app project. Returns matching lines with file paths, line numbers, and optional surrounding context lines.

Input Schema

NameRequiredDescriptionDefault
globNoOptional glob pattern to filter files (e.g. '*.typ' or '*.bib')
pathNoOptional directory or file path to restrict search (e.g. 'chapters/' or 'main.typ')
limitNoMaximum number of matches to return (default: 100)
contextNoNumber of lines to show before and after each match (default: 0)
literalNoTreat pattern as literal string instead of regex (default: false)
patternYesSearch pattern (regular expression or literal string)
projectIdYesThe Typst project ID
ignoreCaseNoCase-insensitive search (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose useful behavior: regex or literal matching, and that results include file paths, line numbers and optional context. It omits the read-only/non-mutating guarantee, the default match limit, and any scope or performance caveats.

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?

Two tightly written sentences with the operation front-loaded and the return format second. No filler, though it could fold in one routing hint without bloat.

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

Completeness4/5

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

For an eight-parameter read tool with a fully described schema and no output schema, the description covers what it does and what comes back. The missing piece is the behavioral context that annotations would normally supply, such as read-only safety and the default result limit.

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 coverage is 100%, so every parameter including glob, path, limit, context, literal and ignoreCase is already documented in the schema. The description adds only that regexes are supported by default, which the schema also implies; baseline 3 applies.

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?

States a specific verb and resource: search for text or regex across files in a Typst project, and summarizes the return shape. It is clearly distinguishable from typst_find_and_replace and typst_read_file by being read-only search, though it never names a sibling explicitly.

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?

Usage is only implied by the verb 'search'. There is no guidance on when to prefer this over typst_read_file or typst_list_files, nor on when a regex versus literal search is appropriate beyond the parameter default.

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