OneHash MCP by usefulapi
List, read, create and update records of any DocType in OneHash.
使うべきか
品質と安全性
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"onehash": {
"url": "https://onehash.usefulapi.io/mcp"
}
}
}リモートエンドポイント
https://onehash.usefulapi.io/mcpstreamable-httpできること
ツール一覧
ツール(5)
🟢onehash_get_logged_user
Return the OneHash API user that the key pair belongs to. Use it first to confirm the connection works. Frappe REST: GET /api/method/frappe.auth.get_logged_user.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢onehash_list_documents(doctype, fields, filters, or_filters, order_by, ...)
List records of one DocType (Customer, Lead, Sales Invoice, Item, …), with optional fields, filters and ordering. Frappe REST: GET /api/resource/:doctype. Returns at most `limit` records (default 20); page with `start`.
入力スキーマ
{
"type": "object",
"properties": {
"doctype": {
"type": "string",
"minLength": 1,
"maxLength": 140,
"description": "DocType name as shown in OneHash, for example \"Customer\", \"Sales Invoice\" or \"Lead\"."
},
"fields": {
"description": "Fieldnames to return, e.g. [\"name\",\"customer_name\"]. Omit for the default list fields.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 140
}
},
"filters": {
"description": "Frappe filters as [field, operator, value] triples, e.g. [[\"status\",\"=\",\"Open\"],[\"amount\",\">\",100]].",
"type": "array",
"items": {
"minItems": 3,
"maxItems": 3,
"type": "array",
"items": {
"anyOf": [
{
"type": [
"string",
"number",
"boolean",
"null"
]
},
{
"maxItems": 10,
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
}
]
}
}
},
"or_filters": {
"description": "Frappe OR filters, same format as filters; joined with OR.",
"type": "array",
"items": {
"minItems": 3,
"maxItems": 3,
"type": "array",
"items": {
"anyOf": [
{
"type": [
"string",
"number",
"boolean",
"null"
]
},
{
"maxItems": 10,
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
}
]
}
}
},
"order_by": {
"description": "Sort, e.g. \"modified desc\".",
"type": "string",
"maxLength": 200
},
"limit": {
"description": "Records to return (1-100, default 20).",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"start": {
"description": "Records to skip, for paging (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"doctype"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢onehash_get_document(doctype, name, expand_links)
Return one record of a DocType by its name, with all fields (child tables included). Set expand_links to inline linked records. Frappe REST: GET /api/resource/:doctype/:name.
入力スキーマ
{
"type": "object",
"properties": {
"doctype": {
"type": "string",
"minLength": 1,
"maxLength": 140,
"description": "DocType name as shown in OneHash, for example \"Customer\", \"Sales Invoice\" or \"Lead\"."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Document name (the record id), for example \"CUST-00001\"."
},
"expand_links": {
"description": "Inline the linked documents (default false).",
"type": "boolean"
}
},
"required": [
"doctype",
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴onehash_create_document(doctype, data)
Create one new record of a DocType with the given field values. This writes to live business data and cannot be undone by this tool. Frappe REST: POST /api/resource/:doctype. Required fields are rejected by OneHash with a validation error (HTTP 417) that names them.
入力スキーマ
{
"type": "object",
"properties": {
"doctype": {
"type": "string",
"minLength": 1,
"maxLength": 140,
"description": "DocType name as shown in OneHash, for example \"Customer\", \"Sales Invoice\" or \"Lead\"."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "Field values as a JSON object, keyed by fieldname."
}
},
"required": [
"doctype",
"data"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴onehash_update_document(doctype, name, data)
Change some field values of one existing record. Send only the fields to change. This writes to live business data. Frappe REST: PUT /api/resource/:doctype/:name.
入力スキーマ
{
"type": "object",
"properties": {
"doctype": {
"type": "string",
"minLength": 1,
"maxLength": 140,
"description": "DocType name as shown in OneHash, for example \"Customer\", \"Sales Invoice\" or \"Lead\"."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Document name (the record id), for example \"CUST-00001\"."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "Field values as a JSON object, keyed by fieldname."
}
},
"required": [
"doctype",
"name",
"data"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}コミュニティ
エビデンス