| 377 | } |
| 378 | |
| 379 | static bool append_permission_mcp_tools(profile_buffer_t *buffer, |
| 380 | cbm_graph_profile_dialect_t dialect, |
| 381 | cbm_graph_tier_t tier) { |
| 382 | const profile_tool_t *tools = NULL; |
| 383 | size_t count = 0U; |
| 384 | tier_tool_set(tier, &tools, &count); |
| 385 | for (size_t i = 0U; i < count; i++) { |
| 386 | char identifier[160]; |
| 387 | if (!tool_identifier(dialect, tools[i], identifier, sizeof(identifier)) || |
| 388 | !profile_buffer_append(buffer, " \"") || !profile_buffer_append(buffer, identifier) || |
| 389 | !profile_buffer_append(buffer, "\": allow\n")) { |
| 390 | return false; |
| 391 | } |
| 392 | } |
| 393 | return true; |
| 394 | } |
| 395 | |
| 396 | static bool append_yaml_identity(profile_buffer_t *buffer, const char *slug, |
| 397 | const char *description) { |
no test coverage detected