Skip to main content
Glama

Visum Thinker MCP Server

MIT License
test-parse-layout-xml.json•2.96 kB
{"method":"tools/call","params":{"name":"project_execute","arguments":{"projectId":"S000009result_1278407893","code":"# Parse del file .lay XML per trovare le tabelle visibili\nimport os\nimport xml.etree.ElementTree as ET\nresult = {}\ntry:\n project_path = visum.GetPath(1)\n project_dir = os.path.dirname(project_path)\n lay_file = os.path.join(project_dir, 'tabelle_report.lay')\n \n if os.path.exists(lay_file):\n # Parse XML\n try:\n tree = ET.parse(lay_file)\n root = tree.getroot()\n \n result['root_tag'] = root.tag\n result['root_attribs'] = dict(root.attrib)\n \n # Cerca elementi 'list' o 'table' nel XML\n # Prova diversi path\n tables_found = []\n \n # Cerca tutti gli elementi che potrebbero essere tabelle\n for elem in root.iter():\n if 'list' in elem.tag.lower() or 'table' in elem.tag.lower():\n table_info = {\n 'tag': elem.tag,\n 'attribs': dict(elem.attrib)\n }\n \n # Cerca attributi interessanti\n if 'objectType' in elem.attrib or 'netObjectType' in elem.attrib:\n table_info['object_type'] = elem.attrib.get('objectType') or elem.attrib.get('netObjectType')\n \n # Cerca colonne/attributi\n columns = []\n for child in elem:\n if 'column' in child.tag.lower() or 'attribute' in child.tag.lower():\n col_info = dict(child.attrib)\n if 'id' in col_info or 'name' in col_info:\n columns.append(col_info)\n \n if columns:\n table_info['columns'] = columns[:10] # Prime 10 colonne\n table_info['total_columns'] = len(columns)\n \n tables_found.append(table_info)\n \n result['tables_found'] = len(tables_found)\n result['first_5_tables'] = tables_found[:5] if tables_found else 'No tables found'\n \n # Cerca anche elementi 'pane' che potrebbero contenere liste\n panes = root.findall('.//pane')\n result['panes_count'] = len(panes)\n \n if panes:\n first_pane = panes[0]\n result['first_pane_attribs'] = dict(first_pane.attrib)\n \n except ET.ParseError as e:\n result['xml_parse_error'] = str(e)\n except Exception as e:\n result['xml_error'] = str(e)\n \nexcept Exception as e:\n result['error'] = str(e)\nresult","description":"Parse XML layout per trovare tabelle visibili"}},"jsonrpc":"2.0","id":21}

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/multiluca2020/visum-thinker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server