Skip to content

Commit 3b83387

Browse files
tonychang04claude
andcommitted
feat(insforge): add method parameter to invoke function tool
Supports GET, POST, PUT, DELETE (default: POST) as documented. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c0c71fe commit 3b83387

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apps/sim/tools/insforge/invoke.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ export const invokeTool: ToolConfig<InsForgeInvokeParams, InsForgeInvokeResponse
2020
visibility: 'user-or-llm',
2121
description: 'The name of the function to invoke',
2222
},
23+
method: {
24+
type: 'string',
25+
required: false,
26+
visibility: 'user-or-llm',
27+
description: 'HTTP method (GET, POST, PUT, DELETE). Default: POST',
28+
},
2329
body: {
2430
type: 'json',
2531
required: false,
@@ -39,7 +45,7 @@ export const invokeTool: ToolConfig<InsForgeInvokeParams, InsForgeInvokeResponse
3945
const base = params.baseUrl.replace(/\/$/, '')
4046
return `${base}/functions/${params.functionName}`
4147
},
42-
method: 'POST',
48+
method: (params) => (params.method as 'GET' | 'POST' | 'PUT' | 'DELETE') || 'POST',
4349
headers: (params) => ({
4450
apikey: params.apiKey,
4551
Authorization: `Bearer ${params.apiKey}`,

apps/sim/tools/insforge/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export interface InsForgeInvokeParams {
120120
apiKey: string
121121
baseUrl: string
122122
functionName: string
123+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
123124
body?: Record<string, unknown>
124125
}
125126

0 commit comments

Comments
 (0)