Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.Object

Syntax

CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.GlobToolResponse

Summary

Represents the response payload returned by the Claude Code Glob tool after searching for files matching a pattern.

Remarks

The Glob tool performs fast file pattern matching across codebases of any size. It supports standard glob patterns like "**/*.js" or "src/**/*.ts". This response is received in the GlobPostToolUsePayload when the tool_name is “Glob”. Results are sorted by modification time (most recently modified first), making it easy to find recently changed files matching a pattern. Example JSON payload:
{
"filenames": [
"C:\\Projects\\MyApp\\src\\Program.cs",
"C:\\Projects\\MyApp\\src\\Utilities.cs",
"C:\\Projects\\MyApp\\tests\\ProgramTests.cs"
],
"durationMs": 150,
"numFiles": 3,
"truncated": false
}

Constructors

.ctor

Syntax

public GlobToolResponse()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

DurationMs

Gets or sets the duration of the glob operation in milliseconds.

Syntax

public int DurationMs { get; set; }

Property Value

Type: int

Remarks

This indicates how long the file system search took to complete. Large codebases or complex patterns may take longer. The Glob tool is optimized for performance and typically completes quickly even on large codebases.

Filenames

Gets or sets the list of absolute file paths matching the glob pattern.

Syntax

public System.Collections.Generic.List<string> Filenames { get; set; }

Property Value

Type: System.Collections.Generic.List<string>

Remarks

All paths are absolute and sorted by modification time, with the most recently modified files appearing first in the list. On Windows, paths will use backslash separators. The paths can be used directly with other tools like ReadToolInput to read the matched files. If GlobToolResponse.Truncated is true, not all matching files are included in this list due to result limits.

NumFiles

Gets or sets the number of files found matching the pattern.

Syntax

public int NumFiles { get; set; }

Property Value

Type: int

Remarks

This is the count of files in GlobToolResponse.Filenames. If GlobToolResponse.Truncated is true, this represents only the number of files returned, not the total number of matches. A value of 0 indicates no files matched the specified pattern in the search directory.

Truncated

Gets or sets a value indicating whether the results were truncated due to exceeding the maximum result limit.

Syntax

public bool Truncated { get; set; }

Property Value

Type: bool

Remarks

When true, more files matched the pattern than could be returned. Consider using a more specific pattern to narrow down the results, or use the GlobToolInput.Path parameter to search a more specific directory. When results are truncated, the returned files are still sorted by modification time, so the most recently modified matches are included.

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?