Read Artifact
read_artifactRead and grep Jenkins build artifacts such as logs, reports, YAML, and JSON by job, build, and path, with secret masking and safe text-only decoding.
Instructions
Read a text artifact (reports, logs, yaml, json...). With pattern it greps (regex, case-insensitive,
1 line context, max 50 matches); otherwise returns count lines from start (0 = tail). Secrets are masked.
UTF-8, UTF-16 (with BOM) and cp1252 files are decoded; binary files are refused.
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": {
"job": "<job>",
"path": "<path>"
},
"name": "read_artifact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | Job full name like 'cd/master/my-app' (folders separated by '/'), or a Jenkins job/build URL (instance is then detected from the URL). | |
| path | Yes | relativePath from list_artifacts | |
| build | No | Build number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild. | |
| count | No | ||
| start | No | ||
| pattern | No | ||
| instance | No | Jenkins instance name from list_instances. Empty = default instance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |