GitStatusTool
Class: GitStatusTool
Defined in: packages/codeboltjs/src/tools/git/status.ts:107
Base class for declarative tools with built-in validation
Extends
BaseDeclarativeTool<GitStatusParams,ToolFrameworkResult>
Constructors
Constructor
new GitStatusTool(): GitStatusTool;
Defined in: packages/codeboltjs/src/tools/git/status.ts:110
Returns
GitStatusTool
Overrides
BaseDeclarativeTool.constructor
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
canUpdateOutput | readonly | boolean | false | Whether the tool supports live (streaming) output | BaseDeclarativeTool.canUpdateOutput | packages/codeboltjs/src/tools/base-tool.ts:69 |
description | readonly | string | undefined | Description of what the tool does | BaseDeclarativeTool.description | packages/codeboltjs/src/tools/base-tool.ts:65 |
displayName | readonly | string | undefined | The user-friendly display name of the tool | BaseDeclarativeTool.displayName | packages/codeboltjs/src/tools/base-tool.ts:64 |
isOutputMarkdown | readonly | boolean | true | Whether the tool's output should be rendered as markdown | BaseDeclarativeTool.isOutputMarkdown | packages/codeboltjs/src/tools/base-tool.ts:68 |
kind | readonly | Kind | undefined | The kind of tool for categorization and permissions | BaseDeclarativeTool.kind | packages/codeboltjs/src/tools/base-tool.ts:66 |
name | readonly | string | undefined | The internal name of the tool (used for API calls) | BaseDeclarativeTool.name | packages/codeboltjs/src/tools/base-tool.ts:63 |
Name | readonly | string | 'git_status' | - | - | packages/codeboltjs/src/tools/git/status.ts:108 |
parameterSchema | readonly | unknown | undefined | - | BaseDeclarativeTool.parameterSchema | packages/codeboltjs/src/tools/base-tool.ts:67 |
Accessors
explanation
Get Signature
get explanation(): string;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:76
One sentence explanation as to why this tool is being used, and how it contributes to the goal. Defaults to description if not implemented by subclass.
Returns
string
One sentence explanation as to why this tool is being used, and how it contributes to the goal.
Inherited from
BaseDeclarativeTool.explanation
genAISchema
Get Signature
get genAISchema(): FunctionDeclaration;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:118
Get Google GenAI schema format (for backward compatibility)
Returns
FunctionDeclaration
Function declaration schema for Google GenAI (for backward compatibility)
Inherited from
BaseDeclarativeTool.genAISchema
openAIFunctionCall
Get Signature
get openAIFunctionCall(): OpenAIFunctionCall;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:102
Get OpenAI function call format
Returns
Inherited from
BaseDeclarativeTool.openAIFunctionCall
schema
Get Signature
get schema(): OpenAIToolSchema;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:83
Primary schema format (OpenAI tool schema)
Returns
Primary schema format (OpenAI tool schema)
Inherited from
Methods
build()
build(params: GitStatusParams): ToolInvocation<GitStatusParams, ToolFrameworkResult>;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:215
The core of the pattern. It validates parameters and, if successful,
returns a ToolInvocation object that encapsulates the logic for the
specific, validated call.
Parameters
| Parameter | Type |
|---|---|
params | GitStatusParams |
Returns
ToolInvocation<GitStatusParams, ToolFrameworkResult>
Inherited from
buildAndExecute()
buildAndExecute(
params: GitStatusParams,
signal: AbortSignal,
updateOutput?: (output: string) => void): Promise<ToolFrameworkResult>;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:145
A convenience method that builds and executes the tool in one step.
Parameters
| Parameter | Type |
|---|---|
params | GitStatusParams |
signal | AbortSignal |
updateOutput? | (output: string) => void |
Returns
Promise<ToolFrameworkResult>
Inherited from
BaseDeclarativeTool.buildAndExecute
createInvocation()
protected createInvocation(params: GitStatusParams): ToolInvocation<GitStatusParams, ToolFrameworkResult>;
Defined in: packages/codeboltjs/src/tools/git/status.ts:129
Parameters
| Parameter | Type |
|---|---|
params | GitStatusParams |
Returns
ToolInvocation<GitStatusParams, ToolFrameworkResult>
Overrides
BaseDeclarativeTool.createInvocation
validateBuildAndExecute()
validateBuildAndExecute(params: GitStatusParams, abortSignal: AbortSignal): Promise<ToolFrameworkResult>;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:174
A convenience method that builds and executes the tool in one step. Never throws.
Parameters
| Parameter | Type |
|---|---|
params | GitStatusParams |
abortSignal | AbortSignal |
Returns
Promise<ToolFrameworkResult>
Inherited from
BaseDeclarativeTool.validateBuildAndExecute
validateToolParams()
validateToolParams(params: GitStatusParams): string | null;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:223
Validates the raw tool parameters. Subclasses should override this to add custom validation logic beyond the JSON schema check.
Parameters
| Parameter | Type |
|---|---|
params | GitStatusParams |
Returns
string | null
Inherited from
BaseDeclarativeTool.validateToolParams
validateToolParamValues()
protected validateToolParamValues(_params: GitStatusParams): string | null;
Defined in: packages/codeboltjs/src/tools/base-tool.ts:235
Parameters
| Parameter | Type |
|---|---|
_params | GitStatusParams |
Returns
string | null