ezEngine Release 26.9
Loading...
Searching...
No Matches
ezMcpAssetTool Class Reference

Queries the asset database: which asset types exist, which assets exist, and how they relate. More...

#include <AssetTool.h>

Inheritance diagram for ezMcpAssetTool:

Public Member Functions

virtual void OnActivate () override
 Called once, right after the provider was instantiated. Use it to hook into the editor.
 
virtual void OnDeactivate () override
 Called once, before the provider is destroyed.
 
virtual void GetSupportedTools (ezDynamicArray< ezMcpToolDesc > &out_tools) const override
 Appends the description of every tool that this provider implements.
 
virtual void Execute (ezStringView sToolName, const ezVariantDictionary &arguments, ezMcpToolResult &out_result) override
 Executes one of the tools returned by GetSupportedTools().
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Detailed Description

Queries the asset database: which asset types exist, which assets exist, and how they relate.

The tools split along the cost of answering. 'asset_types' and 'asset_health' are type-level and aggregate views that stay cheap on any project. 'asset_find' is the listing half - it narrows thousands of assets down to a handful of GUIDs - and 'asset_info', 'asset_uses' and 'asset_thumbnail' are the detail halves that an agent calls on those few.

'asset_transform' is the only one here that changes anything, and the only one slow enough that a caller has to think about the timeout (see Status.md, 'Tool calls block the editor').

Member Function Documentation

◆ Execute()

void ezMcpAssetTool::Execute ( ezStringView  sToolName,
const ezVariantDictionary arguments,
ezMcpToolResult out_result 
)
overridevirtual

Executes one of the tools returned by GetSupportedTools().

Parameters
sToolNameThe tool to run. A provider with a single tool may ignore this.
argumentsThe 'arguments' object of the call. Missing and mistyped values are normal - the client is an AI and will get this wrong. Validate and report through out_result.

Implements ezMcpToolProvider.

◆ GetSupportedTools()

void ezMcpAssetTool::GetSupportedTools ( ezDynamicArray< ezMcpToolDesc > &  out_tools) const
overridevirtual

Appends the description of every tool that this provider implements.

Implements ezMcpToolProvider.

◆ OnActivate()

void ezMcpAssetTool::OnActivate ( )
overridevirtual

Called once, right after the provider was instantiated. Use it to hook into the editor.

Reimplemented from ezMcpToolProvider.

◆ OnDeactivate()

void ezMcpAssetTool::OnDeactivate ( )
overridevirtual

Called once, before the provider is destroyed.

Reimplemented from ezMcpToolProvider.


The documentation for this class was generated from the following files: