MCPcopy Index your code
hub / github.com/google/adk-python / _create_tool_context

Function _create_tool_context

tests/unittests/tools/test_base_tool.py:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40async def _create_tool_context() -> ToolContext:
41 session_service = InMemorySessionService()
42 session = await session_service.create_session(
43 app_name='test_app', user_id='test_user'
44 )
45 agent = SequentialAgent(name='test_agent')
46 invocation_context = InvocationContext(
47 invocation_id='invocation_id',
48 agent=agent,
49 session=session,
50 session_service=session_service,
51 )
52 return ToolContext(invocation_context)
53
54
55@pytest.mark.asyncio

Calls 4

create_sessionMethod · 0.95
SequentialAgentClass · 0.90
InvocationContextClass · 0.90

Tested by

no test coverage detected