Skip to content

Commit d37791c

Browse files
authored
docs: add regeneration instructions (#309)
1 parent cc4b9af commit d37791c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ MCP Go handles all the complex protocol details and server management, so you ca
9797
- [Session Management](#session-management)
9898
- [Request Hooks](#request-hooks)
9999
- [Tool Handler Middleware](#tool-handler-middleware)
100+
- [Regenerating Server Code](#regenerating-server-code)
100101
- [Contributing](/CONTRIBUTING.md)
101102

102103
## Installation
@@ -760,3 +761,14 @@ Add middleware to tool call handlers using the `server.WithToolHandlerMiddleware
760761

761762
A recovery middleware option is available to recover from panics in a tool call and can be added to the server with the `server.WithRecovery` option.
762763

764+
### Regenerating Server Code
765+
766+
Server hooks and request handlers are generated. Regenerate them by running:
767+
768+
```bash
769+
go generate ./...
770+
```
771+
772+
You need `go` installed and the `goimports` tool available. The generator runs
773+
`goimports` automatically to format and fix imports.
774+

0 commit comments

Comments
 (0)