MCP Tools Reference: developerknowledge.googleapis.com

เครื่องมือ: get_documents

ใช้เครื่องมือนี้เพื่อดึงข้อมูลเนื้อหาทั้งหมดของเอกสารเดียวหรือเอกสารสูงสุด 20 รายการในการเรียกใช้ครั้งเดียว โดยควรดึงข้อมูลชื่อเอกสารจากช่อง parent ของผลลัพธ์จากการเรียกใช้เครื่องมือ search_documents ตั้งค่าพารามิเตอร์ names เป็นรายการชื่อเอกสาร

ตัวอย่างโค้ดต่อไปนี้แสดงวิธีใช้ curl เพื่อเรียกใช้เครื่องมือ get_documents ของ MCP

คำขอ Curl
curl --location 'https://developerknowledge.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_documents",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

สคีมาอินพุต

สคีมาคำขอสำหรับ get_documents

GetDocumentsRequest

การแสดง JSON
{
  "names": [
    string
  ]
}
ช่อง
names[]

string

ต้องระบุ ชื่อเอกสารที่จะดึงข้อมูล ซึ่งส่งคืนโดย search_documents ดึงข้อมูลเอกสารได้สูงสุด 20 รายการในการเรียกใช้ครั้งเดียว ระบบจะส่งคืนเอกสารตามลำดับเดียวกับ names ในคำขอ รูปแบบ: documents/{uri_without_scheme} ตัวอย่าง: documents/docs.cloud.google.com/storage/docs/creating-buckets

สคีมาเอาต์พุต

สคีมาการตอบกลับสำหรับ get_documents

GetDocumentsResponse

การแสดง JSON
{
  "documents": [
    {
      object (Document)
    }
  ]
}
ช่อง
documents[]

object (Document)

เอกสารที่ขอ

เอกสาร

การแสดง JSON
{
  "name": string,
  "uri": string,
  "content": string,
  "description": string,
  "title": string
}
ช่อง
name

string

ตัวระบุ ชื่อทรัพยากรของเอกสาร รูปแบบ: documents/{uri_without_scheme} ตัวอย่าง: documents/docs.cloud.google.com/storage/docs/creating-buckets

uri

string

เอาต์พุตเท่านั้น URI ของเนื้อหา เช่น https://cloud.google.com/storage/docs/creating-buckets

content

string

เอาต์พุตเท่านั้น เนื้อหาของเอกสารในรูปแบบ Markdown

description

string

เอาต์พุตเท่านั้น คำอธิบายเอกสาร

title

string

เอาต์พุตเท่านั้น ชื่อเอกสาร

คำอธิบายประกอบของเครื่องมือ

คำแนะนำที่อาจทำให้เกิดการเปลี่ยนแปลง: ❌ | คำแนะนำที่อาจทำให้เกิดการเปลี่ยนแปลงซ้ำ: ✅ | คำแนะนำแบบอ่านอย่างเดียว: ✅ | คำแนะนำแบบเปิด: ❌