java.lang.Object
com.github.copilot.rpc.PreMcpToolCallHookOutput
Output for a pre-MCP-tool-call hook.
The metaToUse property controls outgoing MCP request metadata:
- Return
nullfrom the hook handler: preserve existing_meta(no-op). - Return a
PreMcpToolCallHookOutputwithmetaToUseleft asnull: remove_metafrom the request. - Return a
PreMcpToolCallHookOutputwithmetaToUseset to a JSON object: replace_metawith that object.
- Since:
- 1.0.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodeGets the metadata to use for the outgoing MCP request.static PreMcpToolCallHookOutputCreates a hook output that removes metadata from the MCP request.setMetaToUse(com.fasterxml.jackson.databind.JsonNode metaToUse) Sets the metadata to use for the outgoing MCP request.static PreMcpToolCallHookOutputwithMeta(com.fasterxml.jackson.databind.JsonNode metaToUse) Creates a hook output that sets the given metadata on the MCP request.
-
Constructor Details
-
PreMcpToolCallHookOutput
public PreMcpToolCallHookOutput()
-
-
Method Details
-
getMetaToUse
public com.fasterxml.jackson.databind.JsonNode getMetaToUse()Gets the metadata to use for the outgoing MCP request.- Returns:
- the metadata JSON node, or
nullto remove metadata
-
setMetaToUse
Sets the metadata to use for the outgoing MCP request.- Parameters:
metaToUse- the metadata JSON node, ornullto remove metadata- Returns:
- this instance for method chaining
-
withMeta
Creates a hook output that sets the given metadata on the MCP request.- Parameters:
metaToUse- the metadata JSON node to use- Returns:
- the hook output
-
removeMeta
Creates a hook output that removes metadata from the MCP request.- Returns:
- the hook output with
nullmetaToUse
-