fast-agent-mcp 0.2.37__py3-none-any.whl → 0.2.38__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.

Potentially problematic release.


This version of fast-agent-mcp might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.2.37
3
+ Version: 0.2.38
4
4
  Summary: Define, Prompt and Test MCP enabled Agents and Workflows
5
5
  Author-email: Shaun Smith <fastagent@llmindset.co.uk>
6
6
  License: Apache License
@@ -24,7 +24,7 @@ mcp_agent/cli/main.py,sha256=XjrgXMBaPKkVqAFo8T9LJz6Tp1-ivrKDOuNYWke99YA,3090
24
24
  mcp_agent/cli/terminal.py,sha256=GRwD-RGW7saIz2IOWZn5vD6JjiArscELBThm1GTFkuI,1065
25
25
  mcp_agent/cli/commands/check_config.py,sha256=JKOHniuMlU1bJ5vmyY7g05HDP7ZYGSQktl19bNx5I4Y,18775
26
26
  mcp_agent/cli/commands/go.py,sha256=LIsOJQuTdfCUcNm7JT-NQDU8cI-GCnYwYjN2VOWxvqs,8658
27
- mcp_agent/cli/commands/quickstart.py,sha256=QSL_LaXMutDJX4GObLHZ8ItaimxI6AY53K5wtwBw4cI,17071
27
+ mcp_agent/cli/commands/quickstart.py,sha256=e4JkGwKGXxVn2yODn50NBxr5-49gqo_3IJVZTVOSPG4,17127
28
28
  mcp_agent/cli/commands/setup.py,sha256=eOEd4TL-b0DaDeSJMGOfNOsTEItoZ67W88eTP4aP-bo,6482
29
29
  mcp_agent/cli/commands/url_parser.py,sha256=5VdtcHRHzi67YignStVbz7u-rcvNNErw9oJLAUFOtEY,5855
30
30
  mcp_agent/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -127,7 +127,6 @@ mcp_agent/resources/examples/data-analysis/analysis-campaign.py,sha256=16gxrQ5kM
127
127
  mcp_agent/resources/examples/data-analysis/analysis.py,sha256=UaZk8RzsIj0TVXIM1kx71nfC_mlyJo-wAXlIHnrXH1I,2578
128
128
  mcp_agent/resources/examples/data-analysis/fastagent.config.yaml,sha256=ini94PHyJCfgpjcjHKMMbGuHs6LIj46F1NwY0ll5HVk,1609
129
129
  mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv,sha256=pcMeOL1_r8m8MziE6xgbBrQbjl5Ijo98yycZn7O-dlk,227977
130
- mcp_agent/resources/examples/mcp/elicitations/README.md,sha256=sNYltJ89sORFl3Id-UFF4lZfpkxLSN_tGtpd0PgBDug,4474
131
130
  mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py,sha256=ZrPcj0kv75QXvtN0J_vhCmwxycnAodv35adUBZ9_8Ss,2903
132
131
  mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py,sha256=n-qVogV2I0GYGwYe-8PG1DEvp4M3JzKHoYmemMEm6Ic,8831
133
132
  mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py,sha256=z9kHdNc6XWjAWkvet7inVBIcYxfWoxU6n9iHrsEqU7A,6206
@@ -157,8 +156,8 @@ mcp_agent/resources/examples/workflows/short_story.md,sha256=XN9I2kzCcMmke3dE5F2
157
156
  mcp_agent/resources/examples/workflows/short_story.txt,sha256=X3y_1AyhLFN2AKzCKvucJtDgAFIJfnlbsbGZO5bBWu0,1187
158
157
  mcp_agent/tools/tool_definition.py,sha256=L3Pxl-uLEXqlVoo-bYuFTFALeI-2pIU44YgFhsTKEtM,398
159
158
  mcp_agent/ui/console_display.py,sha256=UKqax5V2TC0hkZZORmmd6UqUk0DGX7A25E3h1k9f42k,10982
160
- fast_agent_mcp-0.2.37.dist-info/METADATA,sha256=z1g7JwTXMAtWke8OD10kMWgGzJoD9LHNZtoi-a8YASA,30983
161
- fast_agent_mcp-0.2.37.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
162
- fast_agent_mcp-0.2.37.dist-info/entry_points.txt,sha256=oKQeSUVn87pJv8_k1NQ7Ak8cXaaXHCnPAOJRCV_uUVg,230
163
- fast_agent_mcp-0.2.37.dist-info/licenses/LICENSE,sha256=Gx1L3axA4PnuK4FxsbX87jQ1opoOkSFfHHSytW6wLUU,10935
164
- fast_agent_mcp-0.2.37.dist-info/RECORD,,
159
+ fast_agent_mcp-0.2.38.dist-info/METADATA,sha256=oFNrGrMZRDaOR125GzE7PhnjsMxTJGv2vD75Bz_suNY,30983
160
+ fast_agent_mcp-0.2.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
161
+ fast_agent_mcp-0.2.38.dist-info/entry_points.txt,sha256=oKQeSUVn87pJv8_k1NQ7Ak8cXaaXHCnPAOJRCV_uUVg,230
162
+ fast_agent_mcp-0.2.38.dist-info/licenses/LICENSE,sha256=Gx1L3axA4PnuK4FxsbX87jQ1opoOkSFfHHSytW6wLUU,10935
163
+ fast_agent_mcp-0.2.38.dist-info/RECORD,,
@@ -64,14 +64,15 @@ EXAMPLE_TYPES = {
64
64
  "Demonstrates collecting structured data with forms, AI-guided workflows,\n"
65
65
  "and custom handlers. Creates examples in an 'elicitations' subdirectory.",
66
66
  "files": [
67
+ "elicitation_account_server.py",
68
+ "elicitation_forms_server.py",
69
+ "elicitation_game_server.py",
70
+ "fastagent.config.yaml",
71
+ "fastagent.secrets.yaml.example",
67
72
  "forms_demo.py",
68
- "account_creation.py",
69
73
  "game_character.py",
70
74
  "game_character_handler.py",
71
- "elicitation_server.py",
72
- "fastagent.config.yaml",
73
- "fastagent.secrets.yaml.example",
74
- "README.md",
75
+ "tool_call.py",
75
76
  ],
76
77
  "create_subdir": True,
77
78
  },
@@ -252,7 +253,7 @@ def show_overview() -> None:
252
253
  " fastagent quickstart researcher DIR Create researcher example in 'researcher' subdirectory\n"
253
254
  " fastagent quickstart data-analysis DIR Create data analysis examples in 'data-analysis' subdirectory\n"
254
255
  " fastagent quickstart state-transfer DIR Create state transfer examples in 'state-transfer' subdirectory\n"
255
- " fastagent quickstart elicitations DIR Create elicitation form examples in 'elicitations' subdirectory\n\n"
256
+ " fastagent quickstart elicitations DIR Create elicitation examples in 'elicitations' subdirectory\n\n"
256
257
  "[bold]Options:[/bold]\n"
257
258
  " --force Overwrite existing files\n\n"
258
259
  "[bold]Examples:[/bold]\n"
@@ -260,7 +261,7 @@ def show_overview() -> None:
260
261
  " fastagent quickstart researcher . Create in researcher subdirectory\n"
261
262
  " fastagent quickstart data-analysis . --force Force overwrite files in data-analysis subdirectory\n"
262
263
  " fastagent quickstart state-transfer . Create state transfer examples\n"
263
- " fastagent quickstart elicitations . Create interactive form examples"
264
+ " fastagent quickstart elicitations . Create elicitation form examples"
264
265
  )
265
266
  console.print(Panel(usage_text, title="Usage", border_style="blue"))
266
267
 
@@ -1,157 +0,0 @@
1
- # Quick Start: MCP Elicitations
2
-
3
- This quickstart demonstrates **fast-agent**'s elicitation feature - a powerful way to collect structured data from users through forms and interactive prompts.
4
-
5
- ## What are Elicitations?
6
-
7
- Elicitations allow MCP servers to request structured input from users through type-safe forms. This enables:
8
- - User preference collection
9
- - Account registration flows
10
- - Configuration wizards
11
- - Interactive feedback forms
12
- - Any scenario requiring structured user input
13
-
14
- ## Examples Included
15
-
16
- ### 1. Forms Demo (`forms_demo.py`)
17
- A showcase of different form types with beautiful rich console output. Uses the passthrough model to display forms directly to users.
18
-
19
- ```bash
20
- uv run forms_demo.py
21
- ```
22
-
23
- This example demonstrates:
24
- - User profile collection
25
- - Preference settings
26
- - Simple yes/no ratings
27
- - Detailed feedback forms
28
-
29
- ### 2. Account Creation Assistant (`account_creation.py`)
30
- An AI-powered account creation workflow where the LLM initiates the account signup process and the user fills out the form.
31
-
32
- ```bash
33
- # Configure your LLM first (edit fastagent.config.yaml)
34
- uv run account_creation.py --model gpt-4o
35
- ```
36
-
37
- This example shows:
38
- - LLM initiating elicitation via tool calls
39
- - User filling out the form (not the LLM)
40
- - Tool call errors when user cancels/declines
41
- - Success handling when form is completed
42
-
43
- ### 3. Game Character Creator (`game_character.py` + `game_character_handler.py`)
44
- A whimsical example with custom elicitation handling, featuring animated dice rolls and visual effects.
45
-
46
- ```bash
47
- uv run game_character.py
48
- ```
49
-
50
- Features:
51
- - Custom elicitation handler (in separate module for clarity)
52
- - Animated progress bars and typewriter effects
53
- - Epic dice roll mechanics with cosmic bonuses
54
- - Interactive character creation with theatrical flair
55
- - Demonstrates proper handler file organization
56
-
57
- ## Getting Started
58
-
59
- 1. **Setup your environment:**
60
- ```bash
61
- # Activate your Python environment
62
- source .venv/bin/activate # or .venv\Scripts\activate on Windows
63
-
64
- # Install dependencies if needed
65
- uv pip install fast-agent-mcp
66
- ```
67
-
68
- 2. **For the account creation example**, rename `fastagent.secrets.yaml.example` to `fastagent.secrets.yaml` and add your API keys.
69
-
70
- 3. **Run an example:**
71
- ```bash
72
- # Try the forms demo first (quiet mode enabled programmatically)
73
- uv run forms_demo.py
74
- ```
75
-
76
- ## How Elicitations Work
77
-
78
- ### Elicitation Modes
79
-
80
- **fast-agent** supports these elicitation modes:
81
-
82
- 1. **`forms`** - Shows forms to users (great with passthrough model)
83
- 2. **`auto_cancel`** - Automatically cancels all elicitations
84
- 3. **`none`** - No elicitation handling
85
- 4. **Custom handler** - Use your own handler function (overrides mode setting)
86
-
87
- Configure modes in `fastagent.config.yaml`:
88
-
89
- ```yaml
90
- mcp:
91
- servers:
92
- my_server:
93
- command: "uv"
94
- args: ["run", "server.py"]
95
- elicitation:
96
- mode: "forms" # or "auto" or "custom"
97
- ```
98
-
99
- ### Creating Your Own Elicitations
100
-
101
- #### Basic Server-Side Elicitation
102
-
103
- ```python
104
- from pydantic import BaseModel, Field
105
-
106
- class UserPrefs(BaseModel):
107
- theme: str = Field(
108
- description="Color theme",
109
- json_schema_extra={
110
- "enum": ["light", "dark"],
111
- "enumNames": ["Light Mode", "Dark Mode"]
112
- }
113
- )
114
- notifications: bool = Field(True, description="Enable notifications?")
115
-
116
- # In your MCP server:
117
- result = await mcp.get_context().elicit(
118
- "Configure your preferences",
119
- schema=UserPrefs
120
- )
121
- ```
122
-
123
- #### Custom Elicitation Handler
124
-
125
- For advanced interactive experiences, create a custom handler:
126
-
127
- ```python
128
- async def my_custom_handler(context, params) -> ElicitResult:
129
- # Your custom logic here - animations, special effects, etc.
130
- content = {"field": "value"}
131
- return ElicitResult(action="accept", content=content)
132
-
133
- # Register with your agent:
134
- @fast.agent(
135
- "my-agent",
136
- servers=["my_server"],
137
- elicitation_handler=my_custom_handler
138
- )
139
- ```
140
-
141
- See `game_character_handler.py` for a complete example with animations and effects.
142
-
143
- ## Next Steps
144
-
145
- - Explore the example code to understand different patterns
146
- - Try modifying the forms in `elicitation_server.py`
147
- - Create your own custom elicitation handlers
148
- - Check the [documentation](https://fast-agent.ai) for advanced features
149
-
150
- ## Tips
151
-
152
- - Use `rich` for beautiful console output
153
- - Test with passthrough model first, then try real LLMs
154
- - Custom handlers enable creative interactions
155
- - Validate user input in your schemas using Pydantic
156
-
157
- Happy form building! 🚀