McpResourceFunctionOptions interface
Configuration options for an MCP Resource function. This includes trigger-specific options and general function options.
- Extends
-
McpResourceTriggerOptions,Partial<FunctionOptions>
Properties
| handler | The handler function to execute when the trigger is invoked. |
| trigger | The trigger configuration for the MCP Resource. |
Inherited Properties
| description | Description of the resource. Provides additional context about what the resource represents. |
| 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 resource in JSON format. |
| mime |
MIME type of the resource content. Specifies the format of the resource data (e.g., 'application/json', 'text/plain'). |
| resource |
Human-readable name of the resource. This name is displayed to users in MCP client interfaces. |
| 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 |
| size | Optional size in bytes. The expected size of the resource content, if known. |
| title | Optional title for display purposes. A more descriptive title that can be shown in UI elements. |
| uri | Unique URI identifier for the resource (must be absolute). This is the canonical identifier used by MCP clients to reference the resource. |
Property Details
handler
The handler function to execute when the trigger is invoked.
handler: McpResourceTriggerHandler<T>
Property Value
trigger
The trigger configuration for the MCP Resource.
trigger?: McpResourceTrigger
Property Value
Inherited Property Details
description
Description of the resource. Provides additional context about what the resource represents.
description?: string
Property Value
string
Inherited From McpResourceTriggerOptions.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 resource in JSON format.
metadata?: string
Property Value
string
Inherited From McpResourceTriggerOptions.metadata
mimeType
MIME type of the resource content. Specifies the format of the resource data (e.g., 'application/json', 'text/plain').
mimeType?: string
Property Value
string
Inherited From McpResourceTriggerOptions.mimeType
resourceName
Human-readable name of the resource. This name is displayed to users in MCP client interfaces.
resourceName: string
Property Value
string
Inherited From McpResourceTriggerOptions.resourceName
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
size
Optional size in bytes. The expected size of the resource content, if known.
size?: number
Property Value
number
Inherited From McpResourceTriggerOptions.size
title
Optional title for display purposes. A more descriptive title that can be shown in UI elements.
title?: string
Property Value
string
Inherited From McpResourceTriggerOptions.title
uri
Unique URI identifier for the resource (must be absolute). This is the canonical identifier used by MCP clients to reference the resource.
uri: string
Property Value
string
Inherited From McpResourceTriggerOptions.uri