mcp-on-demand-tools 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -279,12 +279,30 @@ async def handle_call_tool(
279
279
  f"Return only the output payload that satisfies the contract."
280
280
  ).replace("\n", " ")
281
281
 
282
+ # Build aggregate context from call history
283
+ aggregate_context_str = "N/A"
284
+ if meta["calls"]:
285
+ call_summaries = []
286
+ for idx, call in enumerate(meta["calls"], 1):
287
+ call_summary = (
288
+ f"Call {idx}: "
289
+ f"params={json.dumps(call['params'])} | "
290
+ f"exit_code={call['exit_code']} | "
291
+ f"output={call['stdout'][:200] if call['stdout'] else '(empty)'}..."
292
+ )
293
+ call_summaries.append(call_summary)
294
+ aggregate_context_str = (
295
+ f"Mode: aggregate\n"
296
+ f"Previous calls ({len(meta['calls'])}):\n" + "\n".join(call_summaries)
297
+ )
298
+
282
299
  full_goose_params = {
283
300
  "tool_name": name,
284
301
  "tool_description": meta.get("description", "(no description)"), # Use .get() for safety
285
302
  "expected_output": meta["expectedOutput"],
286
303
  "side_effects": meta["sideEffects"],
287
304
  "single_call_context": single_call_context_str,
305
+ "aggregate_context": aggregate_context_str,
288
306
  }
289
307
 
290
308
  # Run Goose
@@ -325,7 +343,7 @@ async def main():
325
343
  rs, ws,
326
344
  InitializationOptions(
327
345
  server_name="on-demand-tools",
328
- server_version="0.1.1",
346
+ server_version="0.1.2",
329
347
  capabilities=server.get_capabilities(
330
348
  notification_options=NotificationOptions(
331
349
  tools_changed=True,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-on-demand-tools
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: An MCP server for dynamic tool registration and AI-powered simulation via Goose recipes
5
5
  Author-email: Aaron Goldsmith <aargoldsmith@gmail.com>
6
6
  License-File: LICENSE
@@ -69,7 +69,7 @@ Once registered, tools become immediately available for invocation. Each registe
69
69
  ```
70
70
  ┌─────────────────┐
71
71
  │ MCP Client │
72
- │ (Claude, etc)
72
+ │ (Goose, etc)
73
73
  └────────┬────────┘
74
74
 
75
75
  │ register-tool
@@ -137,14 +137,11 @@ Once registered, tools become immediately available for invocation. Each registe
137
137
 
138
138
  **Important**: This server requires Goose to function. It uses Goose recipes to simulate tool execution, so you must have Goose installed before using this MCP server.
139
139
 
140
- **Compatibility Note**: This server works best with MCP clients that support dynamic tool list updates (like Claude Desktop). Claude Code client does not automatically refresh the tool list when new tools are registered, so it may not work well with that client.
140
+ **Compatibility Note**: This server works best with MCP clients that support dynamic tool list updates (like Goose Desktop). Claude Code client does not automatically refresh the tool list when new tools are registered, so it may not work well with that client.
141
141
 
142
- ### Installing for Claude Desktop
142
+ ### Installing the MCP Server
143
143
 
144
- Add the server configuration to your Claude Desktop config file:
145
-
146
- **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
147
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
144
+ Add the server configuration to your config file:
148
145
 
149
146
  #### Option 1: Use Published Package (Recommended)
150
147
 
@@ -281,10 +278,27 @@ When you invoke a registered tool:
281
278
  - Expected output contract
282
279
  - Side effects declaration
283
280
  - Input parameters (as JSON)
281
+ - **Aggregate context**: History of previous calls to this tool (if any)
284
282
  3. The server executes `goose run --recipe render_template.yaml` with these parameters
285
283
  4. Goose's AI agent reads the contract and generates realistic output that matches the expected format
286
284
  5. The output is extracted and returned to the MCP client
287
285
 
286
+ ### Stateful Tool Execution
287
+
288
+ **New in v0.1.2**: The server now maintains call history for each registered tool. When you invoke a tool multiple times, the AI agent receives context from previous calls, enabling:
289
+
290
+ - **Conversational tools**: Tools can maintain context across multiple invocations
291
+ - **Incremental workflows**: Each call can build upon previous results
292
+ - **State-aware responses**: The AI can generate outputs that reference or continue from previous interactions
293
+
294
+ The aggregate context includes:
295
+ - Total number of previous calls
296
+ - Input parameters from each previous call
297
+ - Exit codes and outputs (first 200 characters)
298
+ - Call sequence/order
299
+
300
+ This allows the tool simulator to provide more coherent and contextual responses in multi-turn interactions.
301
+
288
302
  ## Use Cases
289
303
 
290
304
  This server is ideal for:
@@ -294,6 +308,20 @@ This server is ideal for:
294
308
  - **Demonstration and documentation**: Show how tools would work without building them
295
309
  - **Placeholder tools**: Create temporary tool implementations during development
296
310
 
311
+ ## Changelog
312
+
313
+ ### v0.1.1 (2025-10-12)
314
+ - **Added aggregate context support**: Tool executions now receive history from previous calls
315
+ - Enables stateful, conversational tool behavior across multiple invocations
316
+ - AI agent can now generate contextually-aware responses based on call history
317
+
318
+ ### v0.1.0
319
+ - Initial release
320
+ - Initial MCP server implementation
321
+ - Dynamic tool registration
322
+ - Goose recipe-based tool simulation
323
+
324
+
297
325
  ## License
298
326
 
299
327
  See [LICENSE](LICENSE) file for details.
@@ -0,0 +1,8 @@
1
+ mcp_on_demand_tools/__init__.py,sha256=KNZ1bD9ZGfyZwlv91Ueeega_1lsRDLs2fYQDgNbBdtc,212
2
+ mcp_on_demand_tools/server.py,sha256=eDw8cMf8SwE9ImVCaGRxXzo68LnqZlDuAhCiESzwWWY,13402
3
+ mcp_on_demand_tools/recipes/render_template.yaml,sha256=XDBNd0gZorhLO_O3585ghBHYGswti306A1hnfhsnB7I,2079
4
+ mcp_on_demand_tools-0.1.1.dist-info/METADATA,sha256=obqkAqdvz4OzlhuMoNt0X3Kw-sEzfirdZoel79B-2rc,10816
5
+ mcp_on_demand_tools-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ mcp_on_demand_tools-0.1.1.dist-info/entry_points.txt,sha256=nAZZoWWaw4gQn1Eg9lHDvu7YB2EuhcLoWua9GluZO8A,65
7
+ mcp_on_demand_tools-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
+ mcp_on_demand_tools-0.1.1.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- mcp_on_demand_tools/__init__.py,sha256=KNZ1bD9ZGfyZwlv91Ueeega_1lsRDLs2fYQDgNbBdtc,212
2
- mcp_on_demand_tools/server.py,sha256=Isq4cKGB7CJVWaFZrEpbxlLgA3E5__0zzxkrrTMiT78,12684
3
- mcp_on_demand_tools/recipes/render_template.yaml,sha256=XDBNd0gZorhLO_O3585ghBHYGswti306A1hnfhsnB7I,2079
4
- mcp_on_demand_tools-0.1.0.dist-info/METADATA,sha256=pF8fIRLLwfWSRyH4ILOSrZHpiwEq82rR0M4jP3ukMos,9709
5
- mcp_on_demand_tools-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- mcp_on_demand_tools-0.1.0.dist-info/entry_points.txt,sha256=nAZZoWWaw4gQn1Eg9lHDvu7YB2EuhcLoWua9GluZO8A,65
7
- mcp_on_demand_tools-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
- mcp_on_demand_tools-0.1.0.dist-info/RECORD,,