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

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

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

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