MCPcopy Create free account
hub / github.com/docker/docker-agent / operationToolName

Function operationToolName

pkg/tools/builtin/openapi/openapi.go:269–275  ·  view source on GitHub ↗

operationToolName returns a tool name derived from the operationId or the method+path.

(path, method string, op *v3.Operation)

Source from the content-addressed store, hash-verified

267
268// operationToolName returns a tool name derived from the operationId or the method+path.
269func operationToolName(path, method string, op *v3.Operation) string {
270 if op.OperationId != "" {
271 return sanitizeToolName(op.OperationId)
272 }
273
274 return sanitizeToolName(strings.ToLower(method) + "_" + path)
275}
276
277// operationDescription returns a human-readable description for the operation.
278func operationDescription(path, method string, op *v3.Operation) string {

Callers 1

operationToToolMethod · 0.85

Calls 1

sanitizeToolNameFunction · 0.70

Tested by

no test coverage detected