Skip to content

Commit

Permalink
fix: docs warning causing strict mode failure
Browse files Browse the repository at this point in the history
  • Loading branch information
William Bakst committed Dec 7, 2024
1 parent c34683f commit f4474e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/learn/mcp/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! mira ""

<div align="center">
If you haven't already, we recommend first reading the section on [MCP Server](./mcp_server.md)
If you haven't already, we recommend first reading the section on [MCP Server](./server.md)
</div>

MCP Client in Mirascope enables you to interact with MCP servers through a standardized protocol. The client provides methods to access resources, tools, and prompts exposed by MCP servers.
Expand Down Expand Up @@ -82,4 +82,4 @@ This enables full editor support and type checking when using server components.

## Next Steps

By using the MCP client with Mirascope's standard features like [Calls](../calls.md), [Tools](../tools.md), and [Prompts](../prompts.md), you can build powerful applications that leverage local services through MCP servers.
By using the MCP client with Mirascope's standard features like [Calls](../calls.md), [Tools](../tools.md), and [Prompts](../prompts.md), you can build powerful applications that leverage local services through MCP servers.
17 changes: 8 additions & 9 deletions docs/learn/mcp/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! mira ""

<div align="center">
If you haven't already, we recommend first reading the section on [Tools](./tools.md) and [Calls](./calls.md)
If you haven't already, we recommend first reading the section on [Tools](../tools.md)
</div>

MCP (Model Context Protocol) Server in Mirascope enables you to expose resources, tools, and prompts to LLM clients through a standardized protocol. This allows for secure and controlled interactions between host applications (like Claude Desktop) and local services.
Expand All @@ -16,7 +16,6 @@ Let's build a simple book recommendation server using MCP:
--8<-- "examples/learn/mcp/server_decorators.py:3"
```


This example demonstrates:

1. Creating an MCP server with the `MCPServer` class
Expand All @@ -25,11 +24,11 @@ This example demonstrates:
4. Creating a prompt template for book recommendations
5. Running the server asynchronously

## Server Components
## Server Components

### Tools

Tools in MCP Server expose callable functions to clients. Tools can be registered using the `@app.tool()` decorator, which follows the same patterns as described in the [Tools](./tools.md) documentation:
Tools in MCP Server expose callable functions to clients. Tools can be registered using the `@app.tool()` decorator, which follows the same patterns as described in the [Tools](../tools.md) documentation:

```python
--8<-- "examples/learn/mcp/server_decorators.py:12:26"
Expand All @@ -42,7 +41,7 @@ The `@app.tool()` decorator supports all the same functionality as the standard
- Tool configurations and validation
- Computed fields and dynamic configuration

See the [Tools documentation](.././tools.md) for more details on defining and using tools.
See the [Tools documentation](../tools.md) for more details on defining and using tools.

### Resources

Expand All @@ -56,7 +55,7 @@ Resources support both synchronous and asynchronous functions, making them flexi

### Prompts

Prompts define reusable message templates. They can be registered using the `@app.prompt()` decorator, which provides the same functionality as the standard Mirascope `@prompt_template` decorator described in the [Prompts](./prompts.md) documentation:
Prompts define reusable message templates. They can be registered using the `@app.prompt()` decorator, which provides the same functionality as the standard Mirascope `@prompt_template` decorator described in the [Prompts](../prompts.md) documentation:

```python
--8<-- "examples/learn/mcp/server_decorators.py:42:49"
Expand All @@ -71,7 +70,7 @@ The `@app.prompt()` decorator supports all the features of standard Mirascope pr
- Format specifiers
- Computed fields and dynamic configuration

See the [Prompts documentation](.././prompts.md) for more details on creating and using prompts.
See the [Prompts documentation](../prompts.md) for more details on creating and using prompts.

## Alternative Definition Style

Expand All @@ -88,10 +87,10 @@ This alternative style offers several advantages:
3. **Easier Testing**: Functions can be tested in isolation before being registered with the server
4. **Code Organization**: Related functions can be grouped together in separate modules

The same applies for prompts defined with `@prompt_template` - see the [Prompts](.././prompts.md) documentation for more details about prompt reusability.
The same applies for prompts defined with `@prompt_template` - see the [Prompts](../prompts.md) documentation for more details about prompt reusability.

Both the decorator style and this alternative style are fully supported - choose the one that better fits your application's needs.

## Next Steps

By leveraging MCP Server in Mirascope, you can create secure and standardized integrations between LLM clients and local services. This enables powerful capabilities while maintaining control over how LLMs interact with your systems.
By leveraging MCP Server in Mirascope, you can create secure and standardized integrations between LLM clients and local services. This enables powerful capabilities while maintaining control over how LLMs interact with your systems.
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f4474e5

Please sign in to comment.