mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +00:00
Merge pull request #177 from mattn/fix/mcp-search-profile-limit
mcp: apply a default limit of 10 to search_profile
This commit is contained in:
@@ -155,6 +155,9 @@ var mcpServer = &cli.Command{
|
|||||||
), func(ctx context.Context, r mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
), func(ctx context.Context, r mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||||
name := required[string](r, "name")
|
name := required[string](r, "name")
|
||||||
limit, _ := optional[float64](r, "limit")
|
limit, _ := optional[float64](r, "limit")
|
||||||
|
if limit == 0 {
|
||||||
|
limit = 10
|
||||||
|
}
|
||||||
|
|
||||||
res := strings.Builder{}
|
res := strings.Builder{}
|
||||||
res.Grow(500)
|
res.Grow(500)
|
||||||
|
|||||||
Reference in New Issue
Block a user