MCP `tool` is a policy convenience for the standard `tools/call` params.name field. When the endpoint method profile is enabled, authored tool selectors can omit method and are normalized to tools/call internally. Tool arguments intentionally have no policy matcher yet, so every allowed tool call permits all argument payloads by default.
(
mut params: BTreeMap<String, ParamMatcherDef>,
tool: Option<QueryMatcherDef>,
)
| 485 | // intentionally have no policy matcher yet, so every allowed tool call permits |
| 486 | // all argument payloads by default. |
| 487 | fn params_with_tool( |
| 488 | mut params: BTreeMap<String, ParamMatcherDef>, |
| 489 | tool: Option<QueryMatcherDef>, |
| 490 | ) -> BTreeMap<String, ParamMatcherDef> { |
| 491 | if let Some(tool) = tool { |
| 492 | params |
| 493 | .entry("name".to_string()) |
| 494 | .or_insert_with(|| ParamMatcherDef::Matcher(tool)); |
| 495 | } |
| 496 | params |
| 497 | } |
| 498 | |
| 499 | fn allow_def_to_proto(_protocol: &str, allow: L7AllowDef) -> L7Allow { |
| 500 | let params = flatten_param_matchers(params_with_tool(allow.params, allow.tool)); |
no outgoing calls
no test coverage detected