Skip to main content
تفضيلات ملفات الارتباط

نستخدم ملفات ارتباط التحليلات لفهم الاستخدام وتحسين CleanTextLab. يمكنك القبول أو الرفض سياسة الخصوصية. إدارة التفضيلات.

نظف النصوص المعقدة في ثوانٍ. أدوات سريعة تعمل في المتصفح لإزالة فواصل الأسطر، والأحرف الخاصة، والقوائم، وأرقام الهواتف، والرسائل النصية وغيرها. بدون حساب وبدون تحميل.

العودة إلى الوثائق
Docs

Strands Agents

اربط CleanTextLab MCP مع Strands Agents.

المتطلبات

  • Python 3.10+
  • مفتاح API Pro من CleanTextLab
  • تثبيت Strands Agents
python -m venv .venv
source .venv/bin/activate
pip install strands-agents

الخيار A: MCP محلي عبر npx (مُوصى به للتطوير المحلي)

from strands import Agent
from strands.tools.mcp import MCPClient
from mcp import stdio_client, StdioServerParameters

cleantextlab = MCPClient(
    lambda: stdio_client(
        StdioServerParameters(
            command="npx",
            args=["-y", "cleantextlab-mcp"],
            env={"CLEANTEXTLAB_API_KEY": "ctl_live_YOUR_KEY"},
        )
    )
)

with cleantextlab:
    agent = Agent(tools=cleantextlab.list_tools_sync())
    agent("Remove line breaks from: Hello\nworld")

الخيار B: MCP مُستضاف (SSE)

from strands import Agent
from strands.tools.mcp import MCPClient
from mcp import sse_client, SSEServerParameters

cleantextlab = MCPClient(
    lambda: sse_client(
        SSEServerParameters(
            url="https://cleantextlab.com/api/mcp/sse",
            headers={"x-api-key": "ctl_live_YOUR_KEY"},
        )
    )
)

with cleantextlab:
    agent = Agent(tools=cleantextlab.list_tools_sync())
    agent("Generate an ASCII tree from: src/app/page.tsx")

لماذا MCP للوكلاء؟

  • نتائج حتمية لمهام التنسيق
  • عدد أقل من التوكنز عند تفويض العمليات الثقيلة
  • أدوات قابلة لإعادة الاستخدام عبر سير العمل

الخطوات التالية

  • دليل MCP: /docs/mcp-setup
  • مرجع API: /docs/api
  • مركز الأتمتة: /automation
CleanTextLab – أدوات بسيطة للنصوص النظيفة.
كل شيء يعمل في متصفحك؛ بدون حساب أو تحميل.
Strands Agents | CleanTextLab Docs