This repository was archived by the owner on Mar 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +321
-5
lines changed
src/create_mcp_server/template Expand file tree Collapse file tree 3 files changed +321
-5
lines changed Original file line number Diff line number Diff line change @@ -40,3 +40,6 @@ artifacts = ["src/create_mcp_server/template"]
40
40
41
41
[tool .uv ]
42
42
dev-dependencies = [" pyright>=1.1.389" , " ruff>=0.7.4" ]
43
+
44
+ [tool .uv .workspace ]
45
+ members = [" test" ]
Original file line number Diff line number Diff line change @@ -9,17 +9,61 @@ server = Server("{{server_name}}")
9
9
10
10
@server.list_resources()
11
11
async def handle_list_resources() -> list[types.Resource]:
12
- """List available resources."""
12
+ """List available resources.
13
+
14
+ Example return value:
15
+ [
16
+ types.Resource(
17
+ uri=AnyUrl("resource://example"),
18
+ name="Example Resource",
19
+ description="An example resource",
20
+ mimeType="text/plain"
21
+ )
22
+ ]
23
+ """
13
24
return []
14
25
15
26
@server.list_prompts()
16
27
async def handle_list_prompts() -> list[types.Prompt]:
17
- """List available prompts."""
28
+ """List available prompts.
29
+
30
+ Example return value:
31
+ [
32
+ types.Prompt(
33
+ name="example-prompt",
34
+ description="An example prompt",
35
+ arguments=[
36
+ types.PromptArgument(
37
+ name="style",
38
+ description="Style of the prompt",
39
+ required=False
40
+ )
41
+ ]
42
+ )
43
+ ]
44
+ """
18
45
return []
19
46
20
47
@server.list_tools()
21
48
async def handle_list_tools() -> list[types.Tool]:
22
- """List available tools."""
49
+ """List available tools.
50
+
51
+ Example return value:
52
+ [
53
+ types.Tool(
54
+ name="example-tool",
55
+ description="An example tool",
56
+ inputSchema={
57
+ "type": "object",
58
+ "properties": {
59
+ "name": {"type": "string"},
60
+ "value": {"type": "string"}
61
+ },
62
+ "required": ["name", "value"]
63
+ }
64
+ )
65
+ ]
66
+ """
23
67
return []
24
68
25
69
async def main():
You can’t perform that action at this time.
0 commit comments