@@ -120,7 +120,7 @@ func PulsarAdminAddFunctionsTools(s *server.MCPServer, readOnly bool, features [
120120}
121121
122122// handleFunctionsTool returns a handler function for the unified functions tool
123- func handleFunctionsTool (readOnly bool ) func (context.Context , mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
123+ func handleFunctionsTool (readOnly bool ) func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
124124 return func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
125125 // Create Pulsar client with API version V3
126126 client := cmdutils .NewPulsarClientWithAPIVersion (config .V3 )
@@ -222,7 +222,7 @@ func handleFunctionsTool(readOnly bool) func(context.Context, mcp.CallToolReques
222222}
223223
224224// handleFunctionList handles listing all functions under a namespace
225- func handleFunctionList (ctx context.Context , client cmdutils.Client , tenant , namespace string ) (* mcp.CallToolResult , error ) {
225+ func handleFunctionList (_ context.Context , client cmdutils.Client , tenant , namespace string ) (* mcp.CallToolResult , error ) {
226226 // Get function list
227227 functions , err := client .Functions ().GetFunctions (tenant , namespace )
228228 if err != nil {
@@ -240,7 +240,7 @@ func handleFunctionList(ctx context.Context, client cmdutils.Client, tenant, nam
240240}
241241
242242// handleFunctionGet handles getting information about a function
243- func handleFunctionGet (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
243+ func handleFunctionGet (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
244244 // Get function info
245245 functionConfig , err := client .Functions ().GetFunction (tenant , namespace , name )
246246 if err != nil {
@@ -258,7 +258,7 @@ func handleFunctionGet(ctx context.Context, client cmdutils.Client, tenant, name
258258}
259259
260260// handleFunctionStatus handles getting the status of a function
261- func handleFunctionStatus (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
261+ func handleFunctionStatus (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
262262 // Get function status
263263 status , err := client .Functions ().GetFunctionStatus (tenant , namespace , name )
264264 if err != nil {
@@ -276,7 +276,7 @@ func handleFunctionStatus(ctx context.Context, client cmdutils.Client, tenant, n
276276}
277277
278278// handleFunctionStats handles getting the statistics of a function
279- func handleFunctionStats (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
279+ func handleFunctionStats (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
280280 // Get function stats
281281 stats , err := client .Functions ().GetFunctionStats (tenant , namespace , name )
282282 if err != nil {
@@ -294,7 +294,7 @@ func handleFunctionStats(ctx context.Context, client cmdutils.Client, tenant, na
294294}
295295
296296// handleFunctionQuerystate handles querying the state of a function
297- func handleFunctionQuerystate (ctx context.Context , client cmdutils.Client , tenant , namespace , name , key string ) (* mcp.CallToolResult , error ) {
297+ func handleFunctionQuerystate (_ context.Context , client cmdutils.Client , tenant , namespace , name , key string ) (* mcp.CallToolResult , error ) {
298298 // Query function state
299299 state , err := client .Functions ().GetFunctionState (tenant , namespace , name , key )
300300 if err != nil {
@@ -312,7 +312,7 @@ func handleFunctionQuerystate(ctx context.Context, client cmdutils.Client, tenan
312312}
313313
314314// handleFunctionCreate handles creating a new function
315- func handleFunctionCreate (ctx context.Context , client cmdutils.Client , tenant , namespace , name string , arguments map [string ]interface {}) (* mcp.CallToolResult , error ) {
315+ func handleFunctionCreate (_ context.Context , client cmdutils.Client , tenant , namespace , name string , arguments map [string ]interface {}) (* mcp.CallToolResult , error ) {
316316 // Extract required parameters
317317 classname , err := requiredParam [string ](arguments , "classname" )
318318 if err != nil {
@@ -375,7 +375,7 @@ func handleFunctionCreate(ctx context.Context, client cmdutils.Client, tenant, n
375375}
376376
377377// handleFunctionUpdate handles updating an existing function
378- func handleFunctionUpdate (ctx context.Context , client cmdutils.Client , tenant , namespace , name string , arguments map [string ]interface {}) (* mcp.CallToolResult , error ) {
378+ func handleFunctionUpdate (_ context.Context , client cmdutils.Client , tenant , namespace , name string , arguments map [string ]interface {}) (* mcp.CallToolResult , error ) {
379379 // Extract optional parameters
380380 classname , _ := optionalParam [string ](arguments , "classname" )
381381 inputTopics , _ := optionalParamArray [string ](arguments , "inputs" )
@@ -436,7 +436,7 @@ func handleFunctionUpdate(ctx context.Context, client cmdutils.Client, tenant, n
436436}
437437
438438// handleFunctionDelete handles deleting a function
439- func handleFunctionDelete (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
439+ func handleFunctionDelete (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
440440 // Delete function
441441 err := client .Functions ().DeleteFunction (tenant , namespace , name )
442442 if err != nil {
@@ -449,7 +449,7 @@ func handleFunctionDelete(ctx context.Context, client cmdutils.Client, tenant, n
449449}
450450
451451// handleFunctionStart handles starting a function
452- func handleFunctionStart (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
452+ func handleFunctionStart (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
453453 // Start function
454454 err := client .Functions ().StartFunction (tenant , namespace , name )
455455 if err != nil {
@@ -462,7 +462,7 @@ func handleFunctionStart(ctx context.Context, client cmdutils.Client, tenant, na
462462}
463463
464464// handleFunctionStop handles stopping a function
465- func handleFunctionStop (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
465+ func handleFunctionStop (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
466466 // Stop function
467467 err := client .Functions ().StopFunction (tenant , namespace , name )
468468 if err != nil {
@@ -475,7 +475,7 @@ func handleFunctionStop(ctx context.Context, client cmdutils.Client, tenant, nam
475475}
476476
477477// handleFunctionRestart handles restarting a function
478- func handleFunctionRestart (ctx context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
478+ func handleFunctionRestart (_ context.Context , client cmdutils.Client , tenant , namespace , name string ) (* mcp.CallToolResult , error ) {
479479 // Restart function
480480 err := client .Functions ().RestartFunction (tenant , namespace , name )
481481 if err != nil {
@@ -488,7 +488,7 @@ func handleFunctionRestart(ctx context.Context, client cmdutils.Client, tenant,
488488}
489489
490490// handleFunctionPutstate handles putting state into the state store of a function
491- func handleFunctionPutstate (ctx context.Context , client cmdutils.Client , tenant , namespace , name , key , value string ) (* mcp.CallToolResult , error ) {
491+ func handleFunctionPutstate (_ context.Context , client cmdutils.Client , tenant , namespace , name , key , value string ) (* mcp.CallToolResult , error ) {
492492 // Create function state
493493 state := utils.FunctionState {
494494 Key : key ,
@@ -507,7 +507,7 @@ func handleFunctionPutstate(ctx context.Context, client cmdutils.Client, tenant,
507507}
508508
509509// handleFunctionTrigger handles triggering a function
510- func handleFunctionTrigger (ctx context.Context , client cmdutils.Client , tenant , namespace , name , topic , triggerValue string ) (* mcp.CallToolResult , error ) {
510+ func handleFunctionTrigger (_ context.Context , client cmdutils.Client , tenant , namespace , name , topic , triggerValue string ) (* mcp.CallToolResult , error ) {
511511 // Trigger function
512512 result , err := client .Functions ().TriggerFunction (tenant , namespace , name , topic , triggerValue , "" )
513513 if err != nil {
0 commit comments