fix: shorten OpenCode temporary MCP tool names and keep them stable per conversation
Use gbd-/gbc- prefixes with a 6-char conversation hash instead of 20-char per-request hashes, lease per-conversation slots so parallel requests never share a name, and expose gateway custom tools as <server hash>_<name> within the 64-char provider limit.
This commit is contained in:
@@ -77,7 +77,7 @@ import type {
|
||||
ResolvedMcpServer
|
||||
} from '../capabilities/capability-service'
|
||||
import {
|
||||
createMcpToolName,
|
||||
createGatewayMcpToolName,
|
||||
isValidMcpToolName,
|
||||
listAllMcpTools,
|
||||
normalizeMcpToolSchema
|
||||
@@ -848,7 +848,7 @@ export class KnowledgeMcpGateway {
|
||||
>(normalizeMcpToolSchema(tool.outputSchema))
|
||||
: undefined,
|
||||
exposedTool: {
|
||||
name: createMcpToolName(server.id, tool.name),
|
||||
name: createGatewayMcpToolName(server.id, tool.name),
|
||||
title: `${server.name} / ${tool.name}`.slice(0, 200),
|
||||
description: [
|
||||
`GoodBuddy 代理的自定义 MCP Server「${server.name}」工具。`,
|
||||
|
||||
Reference in New Issue
Block a user