McpArgumentMatching interface

Compares the argument values of an MCP request with a list of values. Only string values are compared, and a boolean compares as true or false. Without a path, object keys are compared too.

Properties

matchCase

Whether the comparison is case-sensitive. The default is CaseSensitive.

matchType

How the string is compared with the values.

path

A JSONPath into the request's params.arguments object, which is $: 1 to 8 segments, the first .name and the others .name or [*] (at most once), for example $.repoName or $.paths[*]. With a path, a missing key (also in an array element), a key that differs only in case, or a value of the wrong type on the way is a mismatch: an Allow condition holds only when there is none and every selected value passes, and a Deny condition also holds when there is one, when the path selects nothing, or when a selected value is not a string or boolean. Without a path every string or boolean argument value and every object key is compared; this is allowed only for ExactMatch or Contains in a Deny rule and for NotExactMatch or NotContains in an Allow rule.

values

The values to compare with: 1 to 64, or 1 to 16 non-empty values for Contains and NotContains.

Property Details

matchCase

Whether the comparison is case-sensitive. The default is CaseSensitive.

matchCase?: string

Property Value

string

matchType

How the string is compared with the values.

matchType: string

Property Value

string

path

A JSONPath into the request's params.arguments object, which is $: 1 to 8 segments, the first .name and the others .name or [*] (at most once), for example $.repoName or $.paths[*]. With a path, a missing key (also in an array element), a key that differs only in case, or a value of the wrong type on the way is a mismatch: an Allow condition holds only when there is none and every selected value passes, and a Deny condition also holds when there is one, when the path selects nothing, or when a selected value is not a string or boolean. Without a path every string or boolean argument value and every object key is compared; this is allowed only for ExactMatch or Contains in a Deny rule and for NotExactMatch or NotContains in an Allow rule.

path?: string

Property Value

string

values

The values to compare with: 1 to 64, or 1 to 16 non-empty values for Contains and NotContains.

values: string[]

Property Value

string[]