buck2-mcp
v1.0.1Buck2 MCP: parse BUCK files, validate targets, loads and names.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
detect_files
Find Buck2 files (.buck, BUCK) in a directory tree.
| Parameter | Type | Description |
|---|---|---|
maxDepth | integer | |
path | string |
read_file
Read a Buck2 file, optionally a line range.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
cwd | string | |
endLine | integer | |
startLine | integer |
write_file
Write a Buck2 file. Refuses to overwrite unless overwrite is true.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
path * | string | |
cwd | string | |
overwrite | boolean |
parse
Parse Buck2 into records, fields and document metadata.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
path | string |
validate
Validate Buck2 against its structural rules and report every issue with a line number.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
path | string |
summarize
Summarize a Buck2 document: metadata, record counts and per-kind totals.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
path | string |
list_records
List Buck2 record ids and kinds, with a limit.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
limit | integer | |
path | string |
get_record
Return one Buck2 record by id, with all parsed fields.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
content | string | |
cwd | string | |
path | string |
search
Search Buck2 records by plain text or regular expression.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
content | string | |
cwd | string | |
limit | integer | |
path | string | |
regex | boolean |
stats
Numeric statistics for Buck2 fields across all records.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
field | string | |
path | string |
to_json
Export every parsed Buck2 record as JSON.
| Parameter | Type | Description |
|---|---|---|
content | string | |
cwd | string | |
path | string |
diff
Compare two Buck2 documents: added, removed and changed records.
| Parameter | Type | Description |
|---|---|---|
cwd | string | |
leftContent | string | |
leftPath | string | |
rightContent | string | |
rightPath | string |
format_reference
Return a compact Buck2 reference: structure, required fields and common pitfalls.
sample
Return a small but valid Buck2 example document.