api.mcp

update()

api.mcp.update(name, { tools?, category?, token?, label?, url? }) → Promise<Server>

غيّر الأدوات المسموح بها، فئة الاذن، الرمز، العلامة أو العنوان. فقط ما تمرره هو الذي تمسّه.

PATCHtools replaces the lista new address is checked
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

toolsstring[]

لا -القائمة المسموح بها [] لا يسمح بأي شيء.

categorystring

read · write · exec.

tokenstring|null

أي جديد يُنظّفُ نفس الطريقِ. null يزيله.

labelstring

الاسم الذي هو اسم العرض.

urlstring

عنوان جديد - تم التحقق منه كوصلة جديدة.

// Allow two tools and nothing else
await api.mcp.update("example", { tools: ["search_docs", "get_issue"] });

// Make them free to call in auto mode
await api.mcp.update("example", { category: "read" });

// Rotate the token
await api.mcp.update("example", { token: process.env.EXAMPLE_TOKEN_NEW });

// Turn the server off without disconnecting it
await api.mcp.update("example", { tools: [] });
import os

# Allow two tools and nothing else
api.mcp.update("example", tools=["search_docs", "get_issue"])

# Make them free to call in auto mode
api.mcp.update("example", category="read")

# Rotate the token
api.mcp.update("example", token=os.environ["EXAMPLE_TOKEN_NEW"])

# Turn the server off without disconnecting it
api.mcp.update("example", tools=[])

أدوات الاستبدال، لا تضاف

أنت تريد

جاري إرسال اسم واحد يترك بالضبط أداة واحدة مسموح بها. لإضافة واحد، اقرأ القائمة الحالية مع الحصول على () وأرسلها مع الإضافة.

const server = await api.mcp.get("example");
const allowed = server.tools.filter((t) => t.allowed).map((t) => t.name);
await api.mcp.update("example", { tools: [...allowed, "create_issue"] });
server = api.mcp.get("example")
allowed = [t["name"] for t in server["tools"] if t["allowed"]]
api.mcp.update("example", tools=[*allowed, "create_issue"])

تغيير الفئة هو قرار إذن

read كل أداة من هذا الخادم حرّة لتتصل في كلّ نمط لكن الخطة. ضبطه فقط عندما تعرف ما الذي يفعلونه جميعاً -- الصنف هو الخادم ، ليس الـ أداة ، لذا كتابة واحدة بين قراءة واحدة سبب كافي لتركها عند exec.

عنوان جديد يمر من خلال نفس الشيك

وعنوان لا يمر مع رفض url_blocked و الـ اتصاله تُركت كما كانت

جاري تشغيل خادم

tools: [] مفيد لإيقاف خادم سوء التصرف يصل إلى أيّ عملية، دون فقدان شهادة التفويض.