Skip to main content

preset_context_get

Read the current runtime context.

Reference

Parameters

  • Name
    componentName
    Type
    string · optional
    Description

    Get context for a specific component

Returns

{
  hasContext   Whether any context is active
  context      The active context object (or null)
  allContexts  All active context entries (for multi-component sessions)
}

Description

Read the current runtime context.

Returns the context previously pushed via preset_context_push. Use this to verify what context is active or to inspect multi-component state.

Parameters:

  • componentName (optional): Get context for a specific component. If omitted, returns the most recently pushed context.

Source

Defined in packages/mcp/src/tools.ts. The request handler lives alongside its registration in packages/mcp/src/tools/.

Was this page helpful?

Last reviewed by @jschuyler