searchBuildLog
Search Jenkins build logs for lines matching a pattern, with support for regex, case-insensitive search, and context lines. Retrieve matches from a specific build or the latest build.
Instructions
Search for log lines matching a pattern in a specific build or the last build
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"jobFullName": "<jobFullName>",
"pattern": "<pattern>"
},
"name": "searchBuildLog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobFullName | Yes | Full name of the Jenkins job | |
| buildNumber | No | Build number (omit for last build) | |
| pattern | Yes | Search pattern (string or regex) | |
| useRegex | No | Treat pattern as regex | |
| ignoreCase | No | Case-insensitive search | |
| maxMatches | No | Maximum number of matches to return (max 1000) | |
| contextLines | No | Number of context lines before and after each match (max 10) |