AppFunctionBehaviorHintsMetadata


class AppFunctionBehaviorHintsMetadata


Advisory hints about the runtime behavior of an app function.

The properties conform to the Model Context Protocol (MCP) ToolAnnotations specification: isReadOnly, isDestructive, isIdempotent, and isOpenWorld.

Callers must account for the following semantics when interpreting these hints:

  • No binding contract: Hints are purely advisory and do not prescribe how callers should react. Turning hints into a policy (for example, prompting for confirmation before calling a function with isDestructive set to true) is entirely up to the caller.

  • Untrusted by default: Hints are self-reported by the providing app and are not verified to match the function's actual implementation. Callers should not rely on hints from untrusted apps for security-critical decisions.

  • No validation: The library does not validate hint values or combinations at declaration time, construction time, or reading time. Behavior hints are bespoke signals between the providing app (server) and caller (client) that the library does not mediate; the values are passed through as-is for the caller and providing app to interpret.

Summary

Public constructors

AppFunctionBehaviorHintsMetadata(
    isReadOnly: Boolean,
    isDestructive: Boolean,
    isIdempotent: Boolean,
    isOpenWorld: Boolean
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Boolean

Whether the app function may perform destructive updates to its environment, as opposed to purely additive updates.

Boolean

Whether calling the app function repeatedly with the same arguments has no additional effect on its environment.

Boolean

Whether the app function may interact with an external "open world" of entities, as opposed to operating strictly within a closed domain.

Boolean

Whether the app function does not modify its environment.

Public constructors

AppFunctionBehaviorHintsMetadata

Added in 1.1.0-alpha01
AppFunctionBehaviorHintsMetadata(
    isReadOnly: Boolean,
    isDestructive: Boolean,
    isIdempotent: Boolean,
    isOpenWorld: Boolean
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

isDestructive

Added in 1.1.0-alpha01
val isDestructive: Boolean

Whether the app function may perform destructive updates to its environment, as opposed to purely additive updates.

Destructive updates include deleting or overwriting existing data, whereas additive updates only create new records. Meaningful only when the function modifies its environment (that is, when isReadOnly is false).

isIdempotent

Added in 1.1.0-alpha01
val isIdempotent: Boolean

Whether calling the app function repeatedly with the same arguments has no additional effect on its environment.

Meaningful only when the function modifies its environment (that is, when isReadOnly is false).

isOpenWorld

Added in 1.1.0-alpha01
val isOpenWorld: Boolean

Whether the app function may interact with an external "open world" of entities, as opposed to operating strictly within a closed domain.

Examples include searching the web, sending messages to external recipients, or calling third-party services, as opposed to operating strictly within local app storage.

isReadOnly

Added in 1.1.0-alpha01
val isReadOnly: Boolean

Whether the app function does not modify its environment.