Skip to content

Commit 2a47be7

Browse files
committed
add verbiage for optional/required fields in scope
1 parent 95ac8b7 commit 2a47be7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/harness/scope.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ func NoopPropertyOption() mcp.PropertyOption {
1717
// what is set in the env variables.
1818
func WithScope(config *config.Config, required bool) mcp.ToolOption {
1919
opt := NoopPropertyOption()
20+
verbiage := "Optional" // this helps with having the client not pass in bogus parameters
2021
if required {
2122
opt = mcp.Required()
23+
verbiage = "Required"
2224
}
2325
return func(tool *mcp.Tool) {
2426
defaultProjectOpt := NoopPropertyOption()
@@ -30,12 +32,12 @@ func WithScope(config *config.Config, required bool) mcp.ToolOption {
3032
defaultProjectOpt = mcp.DefaultString(config.DefaultProjectID)
3133
}
3234
mcp.WithString("org_id",
33-
mcp.Description("The ID of the organization."),
35+
mcp.Description(fmt.Sprintf("%s ID of the organization.", verbiage)),
3436
defaultOrgOpt,
3537
opt,
3638
)(tool)
3739
mcp.WithString("project_id",
38-
mcp.Description("The ID of the project."),
40+
mcp.Description(fmt.Sprintf("%s ID of the project.", verbiage)),
3941
defaultProjectOpt,
4042
opt,
4143
)(tool)

0 commit comments

Comments
 (0)