McpToolFunctionOptions interface
Configuration options for an MCP Tool function. This includes trigger-specific options and general function options.
- Extends
-
McpToolTriggerOptions,Partial<FunctionOptions>
Properties
| handler | The handler function to execute when the trigger is invoked. |
| trigger | The trigger configuration for the MCP Tool. |
Inherited Properties
| description | A description of the tool or trigger. This provides additional context about the trigger's purpose. |
| extra |
Configuration for an optional set of secondary inputs
During invocation, get these values with |
| extra |
Configuration for an optional set of secondary outputs
During invocation, set these values with |
| metadata | JSON-serialized metadata object. Additional metadata about the tool in JSON format. |
| result |
Optional JSON-serialized JSON Schema describing the structured result of this tool. When provided, the value is validated as JSON and sent alongside |
| return | Configuration for the optional primary output of the function This is the main output that you should set as the return value of the function handler during invocation |
| tool |
The name of the tool associated with the trigger. This is typically an app setting or environment variable. |
| tool |
Additional properties or metadata for the tool. Can be provided as an array or as a Args object format. |
Property Details
handler
The handler function to execute when the trigger is invoked.
handler: McpToolTriggerHandler<T>
Property Value
trigger
Inherited Property Details
description
A description of the tool or trigger. This provides additional context about the trigger's purpose.
description: string
Property Value
string
Inherited From McpToolTriggerOptions.description
extraInputs
Configuration for an optional set of secondary inputs
During invocation, get these values with context.extraInputs.get()
extraInputs?: FunctionInput[]
Property Value
Inherited From Partial.extraInputs
extraOutputs
Configuration for an optional set of secondary outputs
During invocation, set these values with context.extraOutputs.set()
extraOutputs?: FunctionOutput[]
Property Value
Inherited From Partial.extraOutputs
metadata
JSON-serialized metadata object. Additional metadata about the tool in JSON format.
metadata?: string
Property Value
string
Inherited From McpToolTriggerOptions.metadata
resultSchema
Optional JSON-serialized JSON Schema describing the structured result of this tool.
When provided, the value is validated as JSON and sent alongside useResultSchema: true
so MCP clients that support structured content can use the declared schema.
resultSchema?: string
Property Value
string
Inherited From McpToolTriggerOptions.resultSchema
return
Configuration for the optional primary output of the function This is the main output that you should set as the return value of the function handler during invocation
return?: FunctionOutput
Property Value
Inherited From Partial.return
toolName
The name of the tool associated with the trigger. This is typically an app setting or environment variable.
toolName: string
Property Value
string
Inherited From McpToolTriggerOptions.toolName
toolProperties
Additional properties or metadata for the tool. Can be provided as an array or as a Args object format.
toolProperties?: McpToolProperty[] | Args
Property Value
McpToolProperty[] | Args
Inherited From McpToolTriggerOptions.toolProperties