Codebuff

glob-matcher

v0.0.10
Published Nov 9, 2025

Usage Statistics
v0.0.10

Definition

const agentDefinition = {
id: "glob-matcher",
displayName: "Glob Matcher",
publisher: "codebuff",
version: "0.0.10",
model: "anthropic/claude-sonnet-4.5",
toolNames: [
"glob",
"set_output"
],
spawnableAgents: [],
inputSchema: {
params: {
type: "object",
required: [
"patterns"
],
properties: {
patterns: {
type: "array",
items: {
type: "object",
required: [
"pattern"
],
properties: {
cwd: {
type: "string"
},
pattern: {
type: "string"
}
}
},
description: "Array of glob patterns to match"
}
}
}
},
includeMessageHistory: false,
outputMode: "structured_output",
spawnerPrompt: `Mechanically runs multiple glob pattern matches and returns all matching files`,
systemPrompt: ``,
instructionsPrompt: ``,
stepPrompt: ``,
handleSteps: function* ({ params }) {
const patterns = params?.patterns ?? [], toolResults = [];
for (const query of patterns) {
const { toolResult } = yield {
toolName: "glob",
input: {
pattern: query.pattern,
cwd: query.cwd
}
};
if (toolResult)
toolResults.push(...toolResult.filter((result) => result.type === "json").map((result) => result.value));
}
yield {
toolName: "set_output",
input: {
results: toolResults
},
includeToolCall: !1
};
},
mcpServers: {},
inheritParentSystemPrompt: false
}