Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0

- uses: SamMorrowDrums/mcp-conformance-action@v2.3.0
- uses: SamMorrowDrums/mcp-conformance-action@v2
with:
setup_python: true
python_version: '3.11'
Expand Down
2 changes: 1 addition & 1 deletion mcp_starter/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def register_prompts(mcp: FastMCP) -> None:

@mcp.prompt(
title="Greeting Prompt",
description="Generate a greeting in a specific style",
description="Generate a personalized greeting message with customizable style",
)
def greet(name: str, style: str = "casual") -> str:
"""Generate a greeting prompt.
Expand Down
23 changes: 0 additions & 23 deletions mcp_starter/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,6 @@ def about_resource() -> str:

For more information, visit: https://modelcontextprotocol.io"""

@mcp.resource("file://example.md")
def example_file() -> str:
"""An example markdown document."""
return """# Example Document

This is an example markdown document served as an MCP resource.

## Features

- **Bold text** and *italic text*
- Lists and formatting
- Code blocks

```python
hello = "world"
```

## Links

- [MCP Documentation](https://modelcontextprotocol.io)
- [Python SDK](https://github.com/modelcontextprotocol/python-sdk)
"""

@mcp.resource("greeting://{name}")
def greeting_template(name: str) -> str:
"""Generate a personalized greeting.
Expand Down
1 change: 0 additions & 1 deletion mcp_starter/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
## Available Resources

- **info://about**: Server information
- **file://example.md**: Sample markdown document
- **greeting://{name}**: Personalized greeting template
- **data://items/{item_id}**: Item data by ID

Expand Down
5 changes: 3 additions & 2 deletions mcp_starter/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ def register_tools(mcp: FastMCP) -> None:
),
],
)
def hello(name: str) -> str:
def hello(name: str, uppercase: bool = False) -> str:
"""A friendly greeting tool that says hello to someone.

Args:
name: The name to greet
uppercase: Whether to display the name in uppercase
"""
return f"Hello, {name}! Welcome to MCP."
return f"Hello, {name.upper() if uppercase else name}! Welcome to MCP."

@mcp.tool(
annotations=ToolAnnotations(
Expand Down