MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / get_variables

Method get_variables

src/tool/server.py:212–221  ·  view source on GitHub ↗

Get variables from tools, where each tool's code is used as the variable value. Args: tool_name (Optional[str]): Name of a specific tool. If None, returns variables for all tools. Returns: Dict[str, Variable]: Dictionary mapping tool name

(self, tool_name: Optional[str] = None)

Source from the content-addressed store, hash-verified

210 return await self.tool_context_manager.retrieve(query=query, k=k)
211
212 async def get_variables(self, tool_name: Optional[str] = None) -> Dict[str, 'Variable']:
213 """Get variables from tools, where each tool's code is used as the variable value.
214
215 Args:
216 tool_name (Optional[str]): Name of a specific tool. If None, returns variables for all tools.
217
218 Returns:
219 Dict[str, Variable]: Dictionary mapping tool names to Variable objects.
220 """
221 return await self.tool_context_manager.get_variables(tool_name=tool_name)
222
223 async def get_trainable_variables(self, tool_name: Optional[str] = None) -> Dict[str, 'Variable']:
224 """Get trainable variables from tools, filtering out tools with require_grad=False.

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36