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

Reads and modifies the properties of the objects inside a document. More...

#include <ObjectTool.h>

Inheritance diagram for ezMcpObjectTool:

Public Member Functions

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 ezMcpToolProvider
virtual void OnActivate ()
 Called once, right after the provider was instantiated. Use it to hook into the editor.
 
virtual void OnDeactivate ()
 Called once, before the provider is destroyed.
 
- 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

Reads and modifies the properties of the objects inside a document.

The unit of addressing is one object plus one property name. An object is named by its guid, or implicitly: every tool here defaults to the document's top level object, which for the asset types deriving from ezSimpleAssetDocument is the single object holding all of the asset's settings.

Only direct properties are read. A property whose value is another object reports that object's guid instead of its contents, so walking a tree is a sequence of calls rather than one large response - the same listing/detail split the rest of the tools use.

Modifications go through the document's ezObjectCommandAccessor, so each one is a single undoable transaction. Nothing here saves; that stays an explicit ezMcpDocumentTool call.

Member Function Documentation

◆ Execute()

void ezMcpObjectTool::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 ezMcpObjectTool::GetSupportedTools ( ezDynamicArray< ezMcpToolDesc > &  out_tools) const
overridevirtual

Appends the description of every tool that this provider implements.

Implements ezMcpToolProvider.


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