File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ uv run ruff check .
4040uv run ruff format .
4141```
4242
43- 7 . Submit a pull request to the same branch you branched from
43+ 7 . Update README snippets if you modified example code:
44+ ``` bash
45+ uv run scripts/update_readme_snippets.py
46+ ```
47+
48+ 8 . Submit a pull request to the same branch you branched from
4449
4550## Code Style
4651
Original file line number Diff line number Diff line change @@ -422,9 +422,7 @@ The Context object gives your tools and resources access to MCP capabilities:
422422<!-- snippet-source examples/servers/everything/src/everything/server.py#L37-L54 -->
423423``` python
424424 # Tool with context for logging and progress
425- @mcp.tool (
426- description = " A tool that demonstrates logging and progress" , title = " Progress Tool"
427- )
425+ @mcp.tool (description = " A tool that demonstrates logging and progress" , title = " Progress Tool" )
428426 async def tool_with_progress (message : str , ctx : Context, steps : int = 3 ) -> str :
429427 await ctx.info(f " Starting processing of ' { message} ' with { steps} steps " )
430428
@@ -439,6 +437,8 @@ The Context object gives your tools and resources access to MCP capabilities:
439437 await ctx.debug(f " Completed step { i + 1 } " )
440438
441439 return f " Processed ' { message} ' in { steps} steps "
440+
441+ # Simple tool for basic functionality
442442```
443443_ Full example: [ examples/servers/everything/src/everything/server.py] ( https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/servers/everything/src/everything/server.py#L37-L54 ) _
444444<!-- /snippet-source -->
You can’t perform that action at this time.
0 commit comments