run_filter
Execute a registered filter on a local file and return its text output. Supports JSON, YAML, and TXT files with automatic file type detection.
Instructions
Run a previously registered filter on a local file and return its text output.
Use this tool after register_filter. The server resolves the registered filter, loads the file from the local filesystem, converts it into an in-memory document, calls filter_item(data), and returns the exact text produced by the filter.
Supported file types:
json
yaml
txt
If file_type is omitted, the server tries to detect the type from the file extension.
File loading behavior:
json -> parsed JSON value
yaml -> parsed YAML value
txt -> list of lines
Args: filter_id: Identifier returned earlier by register_filter. file_path: Path to the local file that should be loaded and passed into the filter. file_type: Optional explicit file type override. Use this when extension-based detection is missing or ambiguous.
Returns: A structured object containing the filter identifier, resolved file path, effective file type, filter expiration time, and result_text.
Raises: ValueError: If the filter does not exist, has expired, returns a non-string result, or the file type is unsupported. FileNotFoundError: If the file does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the local file that should be loaded and passed into filter_item(data). | |
| file_type | No | Optional explicit file type override. If omitted, the server detects the type from the file extension. | |
| filter_id | Yes | Identifier previously returned by register_filter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Resolved absolute path of the processed local file. | |
| file_type | Yes | Effective loader type used for the file. One of: json, yaml, txt. | |
| filter_id | Yes | Identifier of the registered filter that produced this result. | |
| expires_at | Yes | UTC timestamp in ISO 8601 format when this filter expires. | |
| result_text | Yes | Exact text returned by filter_item(data). |