Commit Graph

4 Commits

Author SHA1 Message Date
hanishkvc 69be7f2029 SimpleSallap:SimpleMCP: Use ToolManager for some of needed logics
Build the list of tool calls

Trap some of the MCP post json based requests and map to related
handlers. Inturn implement the tool call execution handler.

Add some helper dataclasses wrt expected MCP response structure

TOTHINK: For now maintain id has a string and not int, with idea
to map it directly to callid wrt tool call handshake by ai model.

TOCHECK: For now suffle the order of fields wrt jsonrpc and type
wrt MCP response related structures, assuming the order shouldnt
matter. Need to cross check.
2025-12-06 23:48:58 +05:30
hanishkvc 8700d522a5 SimpleSallap:SimpleMCP:ToolCalls beyond initial go
Define a typealias for HttpHeaders and use it where ever needed.
Inturn map this to email.message.Message and dict for now.
If and when python evolves Http Headers type into better one,
need to replace in only one place.

Add a ToolManager class which
* maintains the list of tool calls and inturn allows any given
  tool call to be executed and response returned along with needed
  meta data
* generate the overall tool calls meta data
* add ToolCallResponseEx which maintains full TCOutResponse for
  use by tc_handle callers

Avoid duplicating handling of some of the basic needed http header
entries.

Move checking for any dependencies before enabling a tool call into
respective tc??? module.
* for now this also demotes the logic from the previous fine grained
  per tool call based dependency check to a more global dep check at
  the respective module level
2025-12-06 22:38:10 +05:30
hanishkvc 47bd2bbc90 SimpleSallap:SimpleMCP:Update toolcall to suite calls needed 2025-12-06 01:47:38 +05:30
hanishkvc 452e610095 SimpleSallap:SimpleMCP:Skeletons for a toolcall class 2025-12-06 00:48:48 +05:30