mirror of
https://github.com/jmagar/unraid-mcp.git
synced 2026-03-23 12:39:24 -07:00
chore: update gitignore, bump to 0.2.1, apply CodeRabbit fixes
- Add .windsurf/, *.bak*, .1code/, .emdash.json to .gitignore - Sync standard gitignore entries per project conventions - Apply final test/tool fixes from CodeRabbit review threads - Update GraphQL schema to latest introspection snapshot - Bump version 0.2.0 → 0.2.1 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,17 +29,17 @@ QUERIES: dict[str, str] = {
|
||||
MUTATIONS: dict[str, str] = {
|
||||
"create": """
|
||||
mutation CreateApiKey($input: CreateApiKeyInput!) {
|
||||
createApiKey(input: $input) { id name key roles }
|
||||
apiKey { create(input: $input) { id name key roles } }
|
||||
}
|
||||
""",
|
||||
"update": """
|
||||
mutation UpdateApiKey($input: UpdateApiKeyInput!) {
|
||||
updateApiKey(input: $input) { id name roles }
|
||||
apiKey { update(input: $input) { id name roles } }
|
||||
}
|
||||
""",
|
||||
"delete": """
|
||||
mutation DeleteApiKeys($input: DeleteApiKeysInput!) {
|
||||
deleteApiKeys(input: $input)
|
||||
mutation DeleteApiKey($input: DeleteApiKeyInput!) {
|
||||
apiKey { delete(input: $input) }
|
||||
}
|
||||
""",
|
||||
}
|
||||
@@ -116,7 +116,7 @@ def register_keys_tool(mcp: FastMCP) -> None:
|
||||
data = await make_graphql_request(MUTATIONS["create"], {"input": input_data})
|
||||
return {
|
||||
"success": True,
|
||||
"key": data.get("createApiKey", {}),
|
||||
"key": (data.get("apiKey") or {}).get("create", {}),
|
||||
}
|
||||
|
||||
if action == "update":
|
||||
@@ -130,14 +130,14 @@ def register_keys_tool(mcp: FastMCP) -> None:
|
||||
data = await make_graphql_request(MUTATIONS["update"], {"input": input_data})
|
||||
return {
|
||||
"success": True,
|
||||
"key": data.get("updateApiKey", {}),
|
||||
"key": (data.get("apiKey") or {}).get("update", {}),
|
||||
}
|
||||
|
||||
if action == "delete":
|
||||
if not key_id:
|
||||
raise ToolError("key_id is required for 'delete' action")
|
||||
data = await make_graphql_request(MUTATIONS["delete"], {"input": {"ids": [key_id]}})
|
||||
result = data.get("deleteApiKeys")
|
||||
result = (data.get("apiKey") or {}).get("delete")
|
||||
if not result:
|
||||
raise ToolError(
|
||||
f"Failed to delete API key '{key_id}': no confirmation from server"
|
||||
|
||||
Reference in New Issue
Block a user