> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Filter Trail Rules

> List approved rules by Trail, domain, cluster, tag, class, or words in the text.

A Trail is a set of rules and procedures the company has written down for a process, such as invoices or payroll. **Filter Trail Rules** lists the approved rules that match every filter you set. Display name **"Filter Trail Rules"**. **Off by default**; enable it per agent.

This matches names and words. It does not search by meaning. For that, use **Search Trail Rules**.

Pass every value you want in one call. Values inside one list match any of them, and a rule must match every list you set. Leave `trails` out to cover every Trail. Questions about what a Trail covers, or which Trails are specific to a client, are answered by the descriptions from **List Trail Domains and Tags**, not by reading rules.

## Authentication and enablement

* No external integration. It reads Trails in the running agent's workspace.
* **Off by default.** Not seeded into new agents.
* An agent sees only its own workspace's Trails.

## Inputs

* `trails` (optional): Trail names or ids. Leave it out for every Trail. A close spelling of a name is accepted when it matches one Trail. Name every Trail you want in this one list.
* `domains` (optional): only rules in these domains. A rule in any listed domain matches. `Unclustered` means rules in no cluster. Combining only `Unclustered` with `clusters` returns nothing.
* `clusters` (optional): only rules in these clusters. A rule in any listed cluster matches. With `domains`, a rule must be in both a listed domain and a listed cluster.
* `tags` (optional): rules carrying any of these labels, including labels nested under them. A word inside a label matches too, so payroll matches Swiss payroll. A close spelling matches when it is the only one that close.
* `exact` (optional): only the exact tags, not nested labels and not labels that merely contain the word.
* `rule_classes` (optional): any of `hard_constraint`, `conditional`, `procedural`, or `style`. A close spelling is accepted. Pass every class you want in this one list.
* `words` (optional): a rule matches when its text contains any of these words. This is literal, not a search.
* `limit` (optional): rules per page, at most 100. A missing, zero, or larger limit becomes 100.
* `cursor` (optional): `next_cursor` from the previous page.

There is no required field. With nothing set, the tool lists approved rules, one page at a time.

## Output

A page of rules, grouped by Trail and then by domain and cluster. Each rule shows its class, priority, text, tags, and the day it last changed. Last changed is the later of when the rule was added and its history log.

When two of the rules on the page conflict, or one refines another, that relation is named under the list.

The first line says which rules these are, out of how many matched. When more remain, the last line is the cursor to pass next. Otherwise it says the results are done.

When `words` is set and nothing matches, the tool adds one line: words match literally, and **Search Trail Rules** finds rules by meaning.

## Limits and side effects

* Only approved rules are returned. A draft or retired rule is left out.
* Pages hold at most 100 rules. Ask again with the cursor for the next page.
* It does not create, edit, or approve rules.
* Each Trail with rules on the returned page is recorded in Activity as a read (a call naming one Trail records it even when nothing matched). That read is not counted as a query on the Trail.

## Expected errors

* An unknown Trail, domain, cluster, tag, or class. A tag error names every unknown tag and the closest labels, and tells you to call **List Trail Domains and Tags** for the full list. A Trail, domain, or cluster error lists every valid name.
* A cursor that is not one this tool issued, or one issued for different filters. Call again without it, or with the filters that returned it.
* Workspace missing from the call.

A workspace with no Trails, or a filter that matches nothing, is not an error. The tool says so.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.