# Build Rust MCP Tools with rmcp

Rust MCP tools need clear schemas, validation, and async behavior. This skill guides developers through rmcp tool macros, parameter design, errors, tests, and common patterns.

## Install

```bash
npx skillstore add emillindfors/mcp-tools-guide
```

## Metadata

- Status: approved
- Slug: emillindfors-mcp-tools-guide
- Skillstore revision: r1
- Version status: missing
- Tree hash: 6afd5f4c1b6ee526b99d5cb232af1cad3b7f991fa0a51545e4a8420ffcd8d39e
- Author: EmilLindfors
- GitHub username: EmilLindfors
- License: MIT
- Repository: https://github.com/EmilLindfors/claude-marketplace/tree/main/plugins/rust-mcp-server/skills/mcp-tools-guide
- Ref: 30c73eac2afe762f6aa9c4553158769369d47351
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, env\_access
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/emillindfors-mcp-tools-guide
- Manifest: https://skillstore.pages.dev/api/skills/emillindfors-mcp-tools-guide/manifest

## Capabilities

- Explains rmcp \#\[tool\] and \#\[tool\(tool\_box\)\] macro usage.
- Shows simple, optional, aggregate, array, and enum parameters.
- Demonstrates return types, Result errors, and custom error enums.
- Provides CRUD, validation, external API, and stateful tool patterns.
- Covers unit tests, property tests, and async performance guidance.

## Use Cases

- Design a New Rust MCP Tool: Plan parameters, returns, errors, and schema behavior before writing the implementation.
- Review Tool API Shape: Check whether descriptions, parameter types, and result handling are clear for AI callers.
- Teach rmcp Patterns: Use concise examples to explain macros, aggregate parameters, validation, testing, and async choices.

## Prompt Templates

### Create a Simple Tool

```
Explain how to create a simple rmcp tool that accepts two typed parameters and returns a typed result.
```

### Design a Tool API

```
Design an rmcp tool API for <task>. Include parameter types, result type, validation rules, and error cases.
```

### Review an Implementation

```
Review this Rust MCP tool for schema quality, error handling, async behavior, testing gaps, and security risks: <paste implementation>.
```

### Plan a Tool Suite

```
Plan a production rmcp tool suite for <domain>. Include tool boundaries, request structs, permissions, tests, and operations concerns.
```

## Limitations

- It is guidance only and does not create a complete MCP server project.
- Examples may need security hardening before production use.
- It focuses on Rust rmcp, not TypeScript or Python MCP SDKs.
- It does not verify generated code against a live MCP client.

## Best Practices

- Start with clear tool descriptions and typed parameters before implementation.
- Validate inputs early, return structured errors, and avoid exposing sensitive data.
- Add unit tests, edge cases, and async performance checks for every tool.

## Anti Patterns

- Using broad string parameters when enums or structured request types fit better.
- Returning raw internal errors that reveal secrets, paths, or service details.
- Copying examples for production without adding authorization, rate limits, and validation.

## Security Audit

- Audited at: 2026-07-05T14:50:11.067\+00:00
- Summary: The static matches are mainly false positives caused by markdown backticks, Rust attributes, example function names, and prose. No prompt injection or malware intent was found. Three semantic content risks remain in examples: unsafe SQL, unrestricted file reads, and API key query strings.

## Stats

- Views: 158
- Downloads: 10
- Favorites: 0
- Popularity score: 0
