# Match Rules

{% hint style="info" %}
**Configures:**

* How to relax constraints when matching requests?
  {% endhint %}

{% hint style="info" %}
Match rules only apply to mocking mode.
{% endhint %}

Matching rules allow you customize which component categories of a request are used for matching. By defualt, only request **query params** and **body** are used for matching. Request **method** and **path** are required for matching and not configurable.

## Rule Configuration

<figure><img src="/files/Z2csstoNvATaoXFBguyB" alt=""><figcaption><p>Figure 1. Matching rules</p></figcaption></figure>

### Method

HTTP verb(s) the rule applies to such as GET, POST, DELETE, etc.

### Pattern

Pattern to match with the request URL to apply the rule to. This supports regular expressions.

### Component

Which components of the request to match on, such as header, body, and query param.

### Modes Applied To

Which agent mode to apply the filter rule to such as mock.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stoobly.com/core-concepts/agent/proxy-settings/match-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
