Repository: googleapis/genai-toolbox
File: internal/tools/looker/lookergetdimensions/lookergetdimensions.go (Go)

Code before:
		AuthRequired: cfg.AuthRequired,
		Client:       s.Client,
		ApiSettings:  s.ApiSettings,
		manifest: tools.Manifest{
			Description:  cfg.Description,
			Parameters:   parameters.Manifest(),
			AuthRequired: cfg.AuthRequired,
		},
		mcpManifest:      mcpManifest,
		ShowHiddenFields: s.ShowHiddenFields,
	}, nil
}

// validate interface
var _ tools.Tool = Tool{}

type Tool struct {
	Name             string `yaml:"name"`
	Kind             string `yaml:"kind"`
	Client           *v4.LookerSDK
	ApiSettings      *rtl.ApiSettings
	AuthRequired     []string         `yaml:"authRequired"`
	Parameters       tools.Parameters `yaml:"parameters"`
	manifest         tools.Manifest
	mcpManifest      tools.McpManifest
	ShowHiddenFields bool `yaml:"show_hidden_fields"`
}

func (t Tool) Invoke(ctx context.Context, params tools.ParamValues, accessToken tools.AccessToken) (any, error) {
	logger, err := util.LoggerFromContext(ctx)
	if err != nil {
		return nil, fmt.Errorf("unable to get logger from ctx: %s", err)
	}
	model, explore, err := lookercommon.ProcessFieldArgs(ctx, params)
	if err != nil {
		return nil, fmt.Errorf("error processing model or explore: %w", err)
	}

	fields := lookercommon.DimensionsFields
	req := v4.RequestLookmlModelExplore{
		LookmlModelName: *model,
		ExploreName:     *explore,
		Fields:          &fields,
	}
	resp, err := t.Client.LookmlModelExplore(req, t.ApiSettings)
	if err != nil {
		return nil, fmt.Errorf("error making get_dimensions request: %w", err)
	}

	if err := lookercommon.CheckLookerExploreFields(&resp); err != nil {
		return nil, fmt.Errorf("error processing get_dimensions response: %w", err)

Review comment (suggestion):
```suggestion
	ShowHiddenFields bool
```

Wouldn't need the `yaml` tag since this value is parsed from the source~ 

Code after:
		AuthRequired: cfg.AuthRequired,
		Client:       s.Client,
		ApiSettings:  s.ApiSettings,
		manifest: tools.Manifest{
			Description:  cfg.Description,
			Parameters:   parameters.Manifest(),
			AuthRequired: cfg.AuthRequired,
		},
		mcpManifest:      mcpManifest,
		ShowHiddenFields: s.ShowHiddenFields,
	}, nil
}

// validate interface
var _ tools.Tool = Tool{}

type Tool struct {
	Name             string `yaml:"name"`
	Kind             string `yaml:"kind"`
	Client           *v4.LookerSDK
	ApiSettings      *rtl.ApiSettings
	AuthRequired     []string         `yaml:"authRequired"`
	Parameters       tools.Parameters `yaml:"parameters"`
	manifest         tools.Manifest
	mcpManifest      tools.McpManifest
	ShowHiddenFields bool
}

func (t Tool) Invoke(ctx context.Context, params tools.ParamValues, accessToken tools.AccessToken) (any, error) {
	logger, err := util.LoggerFromContext(ctx)
	if err != nil {
		return nil, fmt.Errorf("unable to get logger from ctx: %s", err)
	}
	model, explore, err := lookercommon.ProcessFieldArgs(ctx, params)
	if err != nil {
		return nil, fmt.Errorf("error processing model or explore: %w", err)
	}

	fields := lookercommon.DimensionsFields
	req := v4.RequestLookmlModelExplore{
		LookmlModelName: *model,
		ExploreName:     *explore,
		Fields:          &fields,
	}
	resp, err := t.Client.LookmlModelExplore(req, t.ApiSettings)
	if err != nil {
		return nil, fmt.Errorf("error making get_dimensions request: %w", err)
	}

	if err := lookercommon.CheckLookerExploreFields(&resp); err != nil {
		return nil, fmt.Errorf("error processing get_dimensions response: %w", err)