# مكتشفة - مرفوضة

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/mcp-client/discovered/
Language: ar

فما تعلمته المصافحة عن الخادوم ، وأيّ اداته لا يمكن اعلانه — الاسم ، لا السقوط بهدوء .

Status: read after initialize · rejections are named · invalid definitions

```javascript
await client.initialize();
const tools = await client.listTools();

console.log(client.protocolVersion);   // the revision both sides agreed on
console.log(client.rejectedTools);     // [{ name, reason }]
```

## لماذا يتم رفض أداة {#why-rejected}

| السبب | المعنى |
| --- | --- |
| لا | لا شيء ينجو من التثبيت والتشذيب |
| A ترويد معرَ عنوان لا يمكن قراءة | فهي تقع تحت بنية يمكن ان تتفرع ، لذلك لا يوجد طريق واحد لقراءتها في الحجج — فالمواصفة تدعو هذا التعريف غير صحيح . |

> **أداة مرر هو مسمى، لا مخفي**
>
> إسقاطه في صمت من شأنه أن يترك وثائق الخادم الخاصة به واعداً بأداة لا تظهر أبداً، دون أي شيء تشير إليه. السبب هو الشيء الذي يجب إرساله إلى من يقوم بتشغيل الخادم.

## "الخيارات" هي المتفق عليها {#protocol}

ليس ما يفضله هذا العميل وليس ما يفضله الخادم - ما يعرفه كلاهما. إنه مسجل على اتصال، ومرئ في [)أ(](/ar/sdk/ref/mcp/list).

## المُمَاَسَه {#surfacing}

```javascript
if (client.rejectedTools.length) {
  console.warn("not declarable:", client.rejectedTools.map((t) => `${t.name} (${t.reason})`).join(", "));
}
```

- [listTools()](/ar/sdk/ref/mcp-client/list-tools): حيث يحدث الرفض
- [إصدار البروتوكول](/ar/sdk/mcp/protocol-revision): التفاوض على التفاوض

```python
client.initialize()
tools = client.list_tools()

print(client.protocol_version)   # the revision both sides agreed on
```

```python
# The Python client returns every tool the server lists; check each schema yourself
from iagenify import sanitize_schema

declarable = [t for t in tools if sanitize_schema(t.get("inputSchema") or {}).get("type") == "object"]
skipped = [t["name"] for t in tools if t not in declarable]
if skipped:
    print("not declarable:", ", ".join(skipped))
```
