docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FindInFileParams

    Parameters for the Unity.FindInFile tool. Searches a file with a regex pattern and returns line numbers and excerpts.

    Inheritance
    object
    FindInFileParams
    Implements
    IEquatable<FindInFileParams>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AI.MCP.Editor.ToolRegistry.Parameters
    Assembly: Unity.AI.MCP.Editor.dll
    Syntax
    public record FindInFileParams : IEquatable<FindInFileParams>

    Properties

    IgnoreCase

    Gets or sets whether the search should be case-insensitive. Default is true for more flexible matching.

    Declaration
    [McpDescription("Case-insensitive search", Required = false)]
    public bool IgnoreCase { get; set; }
    Property Value
    Type Description
    bool

    MaxResults

    Gets or sets the maximum number of results to return. Default is 200 to prevent overwhelming responses.

    Declaration
    [McpDescription("Maximum number of results to return", Required = false)]
    public int MaxResults { get; set; }
    Property Value
    Type Description
    int

    Pattern

    Gets or sets the regex pattern to search for in the file. This is a required parameter.

    Declaration
    [McpDescription("The regex pattern to search for", Required = true)]
    public string Pattern { get; set; }
    Property Value
    Type Description
    string

    ProjectRoot

    Gets or sets an override for the project root path. When null or empty, uses the current Unity project root.

    Declaration
    [McpDescription("Override project root path", Required = false)]
    public string ProjectRoot { get; set; }
    Property Value
    Type Description
    string

    Uri

    Gets or sets the resource URI to search (e.g., "unity://path/Assets/Scripts/MyScript.cs"). This is a required parameter.

    Declaration
    [McpDescription("The resource URI to search under Assets/", Required = true)]
    public string Uri { get; set; }
    Property Value
    Type Description
    string

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)