[Diagnostic] Multiple MCP Tool Failures - NetBox, create_label_smart, create_label #123

Closed
opened 2026-01-23 21:39:12 +00:00 by lmiranda · 1 comment
Owner

Diagnostic Report

Generated: 2026-01-23T21:45:00Z
Command Tested: NetBox inventory sync, /labels-sync
Reporter: Claude Code via /debug-report

Project Context

Field Value
Repository bandit-den/serv-hotserv
Git Remote git@gitea.hotserv.cloud:bandit-den/serv-hotserv.git
Working Directory /home/lmiranda/apps
Current Branch main

Issues Found

Issue 1: NetBox MCP Tools - Invalid JSON Response

Affected Tools: All mcp__plugin_cmdb-assistant_netbox__* tools

Error:

Error: Invalid JSON response from NetBox: Expecting value: line 8 column 1 (char 7). Status code: 200, Content length: 3509 bytes

Analysis: HTTP status 200 but response is not valid JSON. Likely receiving HTML login page instead of API response.

Workaround: Direct curl commands from inside NetBox container with API token.


Issue 2: create_label_smart - Fails for Repository-Level Labels

Affected Tool: mcp__plugin_projman_gitea__create_label_smart

Error:

Error: list indices must be integers or slices, not str

Analysis: Organization-level labels work, but repository-level labels (Component/, Tech/) fail.


Issue 3: create_label (Direct) - Returns Empty Array

Affected Tool: mcp__plugin_projman_gitea__create_label

Response: [] - Labels NOT actually created.


Issue 4: Gitea API 301 Redirects Lose POST Body

Standard curl -L flag converts POST to GET on redirect. Required --post301 flag.


Issue 5: Repository Name Mismatch in Label URLs

Labels created show URLs pointing to serv-hotserv-apps instead of serv-hotserv.


Summary

Issue Tool Severity Category
Invalid JSON NetBox MCP High Authentication
create_label_smart fails Gitea MCP Medium Logic Error
create_label returns [] Gitea MCP Medium Logic Error
POST body lost on redirect Gitea API Medium Network/Config
Repo name mismatch Gitea Low Configuration

Suggested Investigation

  1. NetBox MCP: Check authentication flow
  2. create_label_smart: Debug org vs repo routing logic
  3. create_label: Verify API endpoint and response parsing
  4. Redirect handling: Use equivalent of --post301 in HTTP client

Generated by /debug-report

## Diagnostic Report **Generated**: 2026-01-23T21:45:00Z **Command Tested**: NetBox inventory sync, /labels-sync **Reporter**: Claude Code via /debug-report ## Project Context | Field | Value | |-------|-------| | Repository | `bandit-den/serv-hotserv` | | Git Remote | `git@gitea.hotserv.cloud:bandit-den/serv-hotserv.git` | | Working Directory | `/home/lmiranda/apps` | | Current Branch | `main` | ## Issues Found ### Issue 1: NetBox MCP Tools - Invalid JSON Response **Affected Tools**: All `mcp__plugin_cmdb-assistant_netbox__*` tools **Error**: ``` Error: Invalid JSON response from NetBox: Expecting value: line 8 column 1 (char 7). Status code: 200, Content length: 3509 bytes ``` **Analysis**: HTTP status 200 but response is not valid JSON. Likely receiving HTML login page instead of API response. **Workaround**: Direct curl commands from inside NetBox container with API token. --- ### Issue 2: create_label_smart - Fails for Repository-Level Labels **Affected Tool**: `mcp__plugin_projman_gitea__create_label_smart` **Error**: ``` Error: list indices must be integers or slices, not str ``` **Analysis**: Organization-level labels work, but repository-level labels (Component/*, Tech/*) fail. --- ### Issue 3: create_label (Direct) - Returns Empty Array **Affected Tool**: `mcp__plugin_projman_gitea__create_label` **Response**: `[]` - Labels NOT actually created. --- ### Issue 4: Gitea API 301 Redirects Lose POST Body Standard curl `-L` flag converts POST to GET on redirect. Required `--post301` flag. --- ### Issue 5: Repository Name Mismatch in Label URLs Labels created show URLs pointing to `serv-hotserv-apps` instead of `serv-hotserv`. --- ## Summary | Issue | Tool | Severity | Category | |-------|------|----------|----------| | Invalid JSON | NetBox MCP | High | Authentication | | create_label_smart fails | Gitea MCP | Medium | Logic Error | | create_label returns [] | Gitea MCP | Medium | Logic Error | | POST body lost on redirect | Gitea API | Medium | Network/Config | | Repo name mismatch | Gitea | Low | Configuration | ## Suggested Investigation 1. **NetBox MCP**: Check authentication flow 2. **create_label_smart**: Debug org vs repo routing logic 3. **create_label**: Verify API endpoint and response parsing 4. **Redirect handling**: Use equivalent of `--post301` in HTTP client --- *Generated by /debug-report*
Author
Owner

Fix Proposed in PR #124

Changes:

  • Fix A: Added type safety to create_label_smart in labels.py - prevents crash when Gitea API returns unexpected type (list instead of dict)
  • Fix D: Modified debug-report.md to always use curl for marketplace issue creation with labels - avoids branch protection restrictions

Issues Addressed:

Issue Status
Issue 2: create_label_smart fails Fixed with type checking
Issue 3: create_label returns [] Handled gracefully
debug-report blocked on main branch Fixed - always uses curl
Labels not applied Fixed - fetches label IDs and includes in payload

Issues NOT Addressed (separate scope):

  • Issue 1: NetBox authentication (requires environment investigation)
  • Issue 4: POST redirect body loss (needs further analysis)
  • Issue 5: Repository name mismatch (configuration issue)

PR: #124

Please test after merge and report back.

## Fix Proposed in PR #124 **Changes:** - **Fix A:** Added type safety to `create_label_smart` in `labels.py` - prevents crash when Gitea API returns unexpected type (list instead of dict) - **Fix D:** Modified `debug-report.md` to always use curl for marketplace issue creation with labels - avoids branch protection restrictions **Issues Addressed:** | Issue | Status | |-------|--------| | Issue 2: create_label_smart fails | Fixed with type checking | | Issue 3: create_label returns [] | Handled gracefully | | debug-report blocked on main branch | Fixed - always uses curl | | Labels not applied | Fixed - fetches label IDs and includes in payload | **Issues NOT Addressed (separate scope):** - Issue 1: NetBox authentication (requires environment investigation) - Issue 4: POST redirect body loss (needs further analysis) - Issue 5: Repository name mismatch (configuration issue) **PR:** http://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/pulls/124 Please test after merge and report back.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#123